Commit Graph

73 Commits

Author SHA1 Message Date
Tatsuya Kinoshita
b0940e8cec English fixes
cf. https://github.com/tats/w3m/pull/241
2023-01-04 19:18:46 +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
57380d6e19 Merge pull request #235 from rkta/retry_filename
Retry if loading of a file fails
2022-12-25 10:06:27 +09:00
nico
4922d25917 Add high-intensity colors option and cli flag. 2022-11-19 13:39:15 -03:00
Rene Kita
8f3fcecc43 Retry if loading of a file fails
This fixes GH issue #210, Debian BTS #537761[1] and obsoletes Debian
BTS #946440[2].

File names like 'a#a.html', 'b?b.html' or 'c%20.html' can not be opened
without using '-o argv_is_url=1' as the file name is interpreted as a
local URL.

If everything fails and argv_is_url is not set retry as a local file.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537761
[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946440
2022-05-02 13:35:51 +02:00
NRK
faeebc076c fix all -Wmissing-prototypes warnings 2022-04-29 15:59:13 +06:00
NRK
b2ce5a9c54 ensure map isn't NULL
main.c:1460:22: warning: Possible null pointer dereference: map [nullPointer]
	    w3mFuncList[(int)map[c]].func();
	                     ^
	main.c:1503:24: note: Calling function 'escKeyProc', 3rd argument 'NULL' value is 0
	 escKeyProc((int)c, 0, NULL);
	                       ^
	main.c:1438:25: note: Assuming condition is Assuming condition is false
	    if (CurrentKey >= 0 && CurrentKey & K_MULTI) {
	                        ^
	main.c:1460:22: note: Null pointer dereference
	    w3mFuncList[(int)map[c]].func();
	                     ^
2022-04-24 06:17:44 +06:00
Rene Kita
e8a41ecfcc Exit if we cannot allocate a new tab during start 2022-04-19 10:08:54 +02:00
Rene Kita
e6998fc9a4 Fix potential null dereference 2022-04-19 10:08:54 +02:00
Rene Kita
916104b7f2 Remove unused variable 2022-02-20 11:14:53 +01:00
Rene Kita
84f724a590 Use standard conforming main() definition 2022-02-20 11:14:53 +01:00
Rene Kita
89295504fc Suppress two warnings when compiling with tcc
While there, add some comments to better understand the code flow in
localcgi_post().
2022-02-20 11:14:53 +01:00
Tatsuya Kinoshita
38c043f50f Check length of hostname with STR_SIZE_MAX 2021-04-24 23:39:34 +09:00
Tatsuya Kinoshita
59ea885da0 Treat 127.0.0.1, [::1], and hostname as localhost 2021-04-23 20:16:50 +09:00
Tatsuya Kinoshita
4e0375c76f Don't include username in Referer 2021-04-10 12:19:58 +09:00
Tatsuya Kinoshita
4e2cfffd88 Don't set Referer when data URI scheme 2021-04-10 11:14:26 +09:00
Tatsuya Kinoshita
47a2a5514b Prevent GC warnings of repeated allocation
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746701
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832407
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862382
2021-03-29 20:37:38 +09:00
Tatsuya Kinoshita
2bbcd7902a Ignore the "-" option to accept w3m - as "read from stdin"
Bug-Debian: https://github.com/tats/w3m/issues/87
2021-03-26 23:10:40 +09:00
Tatsuya Kinoshita
06f2475157 Don't use SECLEVEL when not OPENSSL_TLS_SECURITY_LEVEL 2021-02-21 12:03:51 +09:00
Tatsuya Kinoshita
03f301e219 Add eNULL to ssl_cipher when -insecure 2021-02-21 12:03:04 +09:00
Tatsuya Kinoshita
b6e79c211c Update wording for -debug option 2021-02-11 19:37:28 +09:00
Tatsuya Kinoshita
492dcb182a New option -insecure to use insecure SSL config options
Alias for `-o ssl_cipher=ALL:@SECLEVEL=0 -o ssl_min_version=all
-o ssl_forbid_method= -o ssl_verify_server=0`.
2021-02-11 19:37:21 +09:00
bptato
c5cd2b5716 sixel and osc5379 image display protocols can be chosen in options 2021-02-02 15:06:53 +01:00
Parag Nemade
f1fd7215d2 Fix FTBFS due to redefinition of sys_errlist
Origin: 99f30870ca
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1038009
Bug-MacPorts: https://trac.macports.org/ticket/61356
2020-11-22 21:13:27 +09:00
bptato
99aa56a75c Removed an unnecessary variable declaration 2020-08-31 19:00:17 +02:00
bptato
9916eadf24 New commands for moving to the top, middle and bottom of buffer 2020-08-31 18:02:07 +02:00
Roland Illig
ced87de02c Fix -Wchar-subscripts
Origin: http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/www/w3m/patches/patch-main.c?rev=1.1&content-type=text/plain
Bug: https://sourceforge.net/p/w3m/patches/76/
2020-03-27 20:58:22 +09:00
We're Yet
3f15e127d2 Add command to go home.
When w3m is launched, if no other options are specified, it attempts to
read HTTP_HOME and WWW_HOME from the environment and upon finding a
value for one of these load the url specified.  Once launched, though,
w3m provides no convenience for navigating to the home page.

Here, that ability is added.  A new command GOTO_HOME is defined with a
default key binding of C-_.
2020-01-03 23:42:05 -08:00
Laurent Arnoud
b06d1f6a02 Allow to override UserAgent
Adding on command line the user agent add a duplicate header:

```
./w3m -header "User-Agent: Mozilla" http://localhost:9999

GET / HTTP/1.0
User-Agent: w3m/0.5.3+git20190105
Accept: text/html, text/*;q=0.5, image/*, application/*, message/*, x-scheme-handler/*, audio/*, video/*, inode/*
Accept-Encoding: gzip, compress, bzip, bzip2, deflate
Accept-Language: en;q=1.0
Host: localhost:9999
Pragma: no-cache
Cache-control: no-cache
User-Agent: Mozilla
```

As a result most server will take the first given; the default
w3m_version or the one defined on config `user_agent`

With this patch we can now override `User-Agent` from command line
2019-04-21 21:47:52 +02:00
Tatsuya Kinoshita
18dcbadf27 Make temporary directory safely when ~/.w3m is unwritable 2018-01-21 10:34:11 +09:00
Tatsuya Kinoshita
1fd08f383d Typo fix in fusage()
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=878106
2017-12-27 06:42:26 +09:00
Tatsuya Kinoshita
ace7655fa9 English fix
cf. [emacs-w3m:12706], http://emacs-w3m.namazu.org/ml/msg12598.html
2017-12-27 06:41:57 +09:00
ITOH Yasufumi
73d015d4bb Fix suspend (^Z) behavior.
Suspend the job w3m belongs to, not w3m only.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
2016-11-06 20:29:04 +01:00
Tatsuya Kinoshita
920d56e3f0 Update description of SOURCE and VIEW 2016-06-19 18:36:51 +09:00
Tatsuya Kinoshita
a4031dbd75 Update English messages 2016-06-19 14:19:19 +09:00
Justin B Rye
f4885d0838 English fixes
cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772341#15
Origin: https://lists.debian.org/debian-l10n-english/2014/12/msg00002.html
Origin: https://lists.debian.org/debian-l10n-english/2014/12/msg00030.html
Origin: https://lists.debian.org/debian-l10n-english/2015/02/msg00011.html
2016-04-02 06:51:06 +09:00
Tatsuya Kinoshita
06181fceff Add extbrowser4, extbrowser5, ..., and extbrowser9 2016-03-13 20:06:18 +09:00
Tatsuya Kinoshita
ff21632495 Typo fix for ACCESSKEY
cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779092#5
2016-02-28 08:48:56 +09:00
David Crosby
fc5b50353e Adjust while loop 2015-08-11 21:59:27 +09:00
David Crosby
a00c90930b use int for c 2015-08-11 21:59:27 +09:00
David Crosby
7e5b33c30e Remove dead assignments flagged by Clang static analysis 2015-08-11 21:59:27 +09:00
IWAMOTO Kouichi
dd054480d7 Fix that SGR style mouse handler has off-by-one problem
cf. https://github.com/tats/w3m/issues/5
Origin: https://gist.github.com/ttdoda/30c189a63d483beeb207
Bug: https://sourceforge.net/p/w3m/patches/65/
2015-08-05 06:35:09 +09:00
Tatsuya Kinoshita
928af643ca Correct GC version confirmation 2015-05-03 11:44:14 +09:00
yshl
70334e3605 correct GC version confirmation 2015-05-02 10:42:35 +09:00
yshl
e0641028c7 for gc-7.1 2015-04-26 18:38:08 +09:00
Tatsuya Kinoshita
ee0405c689 Drop C99 features 2015-01-15 20:50:16 +09:00
Scarlett
cbec7032ee Add overflow detection
Origin: http://marc.info/?l=openbsd-ports&m=142090828929750&w=2

* main.c: Call exit(1) when out of memory to avoid dereferencing null
pointers when gc's malloc fails.

* alloc.h: Replacements for w3m's allocation macros which add
overflow detection and concentrate the macros in one file.

* indep.h, libwc/charset.c, libwc/status.c, matrix.c: Use the
overflow-detecting allocation macros from alloc.h.
2015-01-15 19:38:11 +09:00
Scarlett
ec8272d8fe Correct printf arguments and use asprintf
Origin: http://marc.info/?l=openbsd-ports&m=142090828929750&w=2

* Str.c: Use asprintf() instead of rolling our own printf string
length detection.

* cookie.c: Pass the char pointer in the string struct to printf %s
instead of the string struct itself.
Print time_t using %lld instead of %ld to allow for 64-bit time_t.

* main.c: Print a long int using the correct format specifier.

* map.c: Print size_t using the correct format specifier.
2015-01-15 18:58:35 +09:00
Araki Ken
4459dbe26e img2sixel exits by Ctrl+C. Enable GIF Animation if 'I' is pressed to show it. 2014-12-06 20:47:05 +09:00
Araki Ken
2fe66f3a6f Add -sixel option which supports image processing by img2sixel. 2014-12-06 20:47:05 +09:00