aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/020_debian.patch727
1 files changed, 507 insertions, 220 deletions
diff --git a/debian/patches/020_debian.patch b/debian/patches/020_debian.patch
index 88ed75d..c9126b3 100644
--- a/debian/patches/020_debian.patch
+++ b/debian/patches/020_debian.patch
@@ -60,10 +60,60 @@ index 8f443c1..5fb6581 100755
$input = "w3m-control: GOTO_LINK";
}
diff --git a/ChangeLog b/ChangeLog
-index 88358ef..7367d67 100644
+index 88358ef..2ea89c6 100644
--- a/ChangeLog
+++ b/ChangeLog
-@@ -1,3 +1,1693 @@
+@@ -1,3 +1,1743 @@
++2020-05-02 Tatsuya Kinoshita <tats@debian.org>
++
++ * NEWS: Update NEWS for 0.5.3+git20200502.
++
++2020-03-27 Roland Illig <rillig@NetBSD.org>
++
++ * main.c: 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-16 Tatsuya Kinoshita <tats@debian.org>
++
++ * doc-de/MANUAL.html, doc/MANUAL.html: Update documents for GOTO_HOME.
++
++ * doc-de/README.func, doc-jp/README.func, doc-jp/keymap.default:
++ * doc/README.func, doc/keymap.default, scripts/w3mhelp.cgi.in:
++ Add GOTO_HOME to the help page.
++
++2020-03-11 Tatsuya Kinoshita <tats@debian.org>
++
++ * doc-jp/README.SSL, po/de.po, po/ja.po, po/w3m.pot, po/zh_CN.po:
++ * po/zh_TW.po, rc.c: Update documents for ssl_forbid_method.
++
++ * url.c: Extend ssl_forbid_method for TLSv1.2 and TLSv1.3.
++
++2020-01-13 We're Yet <58348703+butwerenotthereyet@users.noreply.github.com>
++
++ * keybind.c, main.c, proto.h: Add command to go home.
++ Origin: https://github.com/tats/w3m/pull/124
++
++2019-11-10 Kyle J. McKay <mackyle@gmail.com>
++
++ * entity.tab, indep.c, indep.h: Support &apos; entity.
++ Origin: https://github.com/tats/w3m/pull/122
++
++2019-07-02 Tatsuya Kinoshita <tats@debian.org>
++
++ * doc-jp/README.siteconf: Update doc-jp for user_agent in siteconf.
++
++2019-07-01 Azure <azure@fox.blue>
++
++ * doc/README.siteconf, fm.h, rc.c, url.c:
++ Allow setting User Agent in Siteconf.
++ Origin: https://github.com/tats/w3m/pull/119
++
++2019-04-21 Laurent Arnoud <laurent@spkdev.net>
++
++ * fm.h, main.c, url.c: Allow to override User-Agent with -header.
++ Origin: https://github.com/tats/w3m/pull/113
++
+2019-01-05 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
@@ -1809,10 +1859,21 @@ index 7d692f9..453072d 100644
do \
(cd $$dir && $(MAKE) $(MAKE_ARGS) uninstall); \
diff --git a/NEWS b/NEWS
-index 66e309d..dac1f5c 100644
+index 66e309d..6cc597f 100644
--- a/NEWS
+++ b/NEWS
-@@ -1,3 +1,89 @@
+@@ -1,3 +1,100 @@
++Debian's w3m 0.5.3+git20200502
++
++* bug fixes
++ - support &apos; entity
++ - prevent multiple User-Agent with -header
++ - fix -Wchar-subscripts
++* new features
++ - support setting user_agent in siteconf
++ - new command GOTO_HOME
++ - extend ssl_forbid_method for TLSv1.2 and TLSv1.3
++
+Debian's w3m 0.5.3+git20190105
+
+* bug fixes
@@ -7188,10 +7249,10 @@ index 0000000..d88ba64
+</html>
diff --git a/doc-de/MANUAL.html b/doc-de/MANUAL.html
new file mode 100644
-index 0000000..f922314
+index 0000000..e12d3b3
--- /dev/null
+++ b/doc-de/MANUAL.html
-@@ -0,0 +1,2340 @@
+@@ -0,0 +1,2353 @@
+
+<html>
+ <head>
@@ -8564,6 +8625,19 @@ index 0000000..f922314
+ </tr>
+ <tr>
+ <td>
++ GOTO_HOME
++ </td>
++ <td>
++ C-_
++ </td>
++ <td>
++ </td>
++ <td>
++ Zurück zur Startseite (die Variablen HTTP_HOME oder WWW_HOME spezifiziert wurden)
++ </td>
++ </tr>
++ <tr>
++ <td>
+ SELECT_MENU
+ </td>
+ <td>
@@ -9534,10 +9608,10 @@ index 0000000..f922314
+</html>
diff --git a/doc-de/README.func b/doc-de/README.func
new file mode 100644
-index 0000000..72d7d45
+index 0000000..036ae9d
--- /dev/null
+++ b/doc-de/README.func
-@@ -0,0 +1,146 @@
+@@ -0,0 +1,147 @@
+ABORT Sofort beenden
+ACCESSKEY Öffne Zugangstasten-Menü
+ADD_BOOKMARK Lege für aktuelle Seite Lesezeichen an
@@ -9570,6 +9644,7 @@ index 0000000..72d7d45
+EXTERN_LINK Verwende externen Browser zur Anzeige des Linkziels
+FRAME Wechsle zwischen Kennung und Umsetzung von HTML-Frames
+GOTO Öffne angegebenes Dokument in neuem Puffer
++GOTO_HOME Zurück zur Startseite (die Variablen HTTP_HOME oder WWW_HOME spezifiziert wurden)
+GOTO_LINE Gehe zur angebenen Zeile
+GOTO_LINK Folge dem aktuellen Hyperlink in neuem Puffer
+GOTO_RELATIVE Gehe zu relativer Adresse
@@ -10117,16 +10192,17 @@ index 074766f..e5e59b1 100644
http://w3m.sourceforge.net/
+ https://sourceforge.net/projects/w3m/
diff --git a/doc-jp/README.SSL b/doc-jp/README.SSL
-index 4aedfde..ac3f4a3 100644
+index 4aedfde..ae22001 100644
--- a/doc-jp/README.SSL
+++ b/doc-jp/README.SSL
-@@ -24,10 +24,10 @@ SSL
+@@ -24,10 +24,11 @@ SSL
SSL ˴ؤưʲ꤬ǽˤʤäƤޤ:
ssl_forbid_method
- ȤʤSSL᥽åɤΥꥹ(2: SSLv2, 3: SSLv3, t: TLSv1)
- (ǥեȤ<NULL>).
-+ ȤʤSSL᥽åɤΥꥹ(2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)
++ ȤʤSSL᥽åɤΥꥹ(2: SSLv2, 3: SSLv3, t: TLSv1.0,
++ 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)
+ (ǥեȤ2, 3).
ssl_verify_server ON/OFF
- SSLΥǧڤԤ(ǥեȤOFF).
@@ -10134,7 +10210,7 @@ index 4aedfde..ac3f4a3 100644
ssl_cert_file ե̾
SSLΥ饤PEMե(ǥեȤ<NULL>).
ssl_key_file ե̾
-@@ -85,6 +85,9 @@ SSL
+@@ -85,6 +86,9 @@ SSL
#
# certdata2pem.rb
@@ -10145,7 +10221,7 @@ index 4aedfde..ac3f4a3 100644
next if line =~ /^#/
next if line =~ /^\s*$/
diff --git a/doc-jp/README.func b/doc-jp/README.func
-index 542aaa9..8a5f821 100644
+index 542aaa9..750d3d7 100644
--- a/doc-jp/README.func
+++ b/doc-jp/README.func
@@ -1,7 +1,7 @@
@@ -10157,7 +10233,14 @@ index 542aaa9..8a5f821 100644
BACK ΥХåեɽޤ
BEGIN ʸΤФιԤ˰ưޤ
BOOKMARK ֥åޡɤ߹ߤޤ
-@@ -36,7 +36,6 @@ GOTO_RELATIVE
+@@ -30,13 +30,13 @@ EXTERN
+ EXTERN_LINK ߤΥ򡤳֥饦Ȥäɽޤ
+ FRAME <FRAME>λؤʸ1ĤʸѴɽޤ
+ GOTO URLꤷƳޤ
++GOTO_HOME ۡڡޤ(ĶѿHTTP_HOMEޤWWW_HOMEǻ)
+ GOTO_LINE ̲ǹֹϤǻꤷԤ˰ưޤ
+ GOTO_LINK 󥯤ؤʸɤߤߤޤ
+ GOTO_RELATIVE URLꤷƳޤ
HELP إץեɽޤ
HISTORY URLɽޤ
INFO ߤʸ˴ؤɽޤ
@@ -10165,7 +10248,7 @@ index 542aaa9..8a5f821 100644
INTERRUPT ʸɤ߹ߤǤޤ
ISEARCH եˤफäƥ󥯥󥿥륵ޤ
ISEARCH_BACK եƬˤफäƥ󥯥󥿥륵ޤ
-@@ -72,6 +71,7 @@ MSGS
+@@ -72,6 +72,7 @@ MSGS
NEW_TAB ֤򳫤ޤ
NEXT ΥХåեɽޤ
NEXT_DOWN β¦ˤ󥯤˰ưޤ
@@ -10173,7 +10256,7 @@ index 542aaa9..8a5f821 100644
NEXT_LEFT κ¦ˤ󥯤˰ưޤ
NEXT_LEFT_UP κ¦(̵ι԰)ˤ󥯤˰ưޤ
NEXT_LINK Υ󥯤˰ưޤ
-@@ -92,6 +92,7 @@ PEEK_LINK
+@@ -92,6 +93,7 @@ PEEK_LINK
PIPE_BUF ХåեƤѥפϤޤ
PIPE_SHELL ޥɤ¹Ԥ̤ɤߤߤʤɽޤ
PREV ΥХåեɽޤ
@@ -10183,10 +10266,10 @@ index 542aaa9..8a5f821 100644
PREV_PAGE Υڡɽޤ
diff --git a/doc-jp/README.siteconf b/doc-jp/README.siteconf
new file mode 100644
-index 0000000..90066f7
+index 0000000..c7617b3
--- /dev/null
+++ b/doc-jp/README.siteconf
-@@ -0,0 +1,60 @@
+@@ -0,0 +1,67 @@
+siteconf: ̥ޥ
+
+siteconf ϡ URL Υѥȡɳդ줿꤫ޤ
@@ -10203,6 +10286,7 @@ index 0000000..90066f7
+url_charset <charset>
+no_referer_from on|off
+no_referer_to on|off
++user_agent "string"
+
+˽񤫤줿Τͥ褵ޤ
+
@@ -10230,6 +10314,12 @@ index 0000000..90066f7
+Ʊ "decode_url" ץ򥪥ˤȡ Wikipedia ؤ
+󥯤 UTF-8 Ȥƥǥɤɽޤ
+
++url m@^https?://(.*\.)google\.com/@
++user_agent "Lynx/2.8.8dev.3 libwww-FM/2.14 SSL-MM/1.4.1"
++
++Google Lynx Ǥȹ𤲤ޤ(ˤƥȥ֥饦ڡ
++֤ޤ)
++
+===== ɽˤĤ =====
+
+ɽϤƱ̣ɽޤ
@@ -10259,6 +10349,18 @@ index 61f7c58..99a1220 100644
+ $B%G%U%)%k%H$O(B OFF (= Can't go back...)
$B$rDI2C$7$F$$$^$9!#(B
+diff --git a/doc-jp/keymap.default b/doc-jp/keymap.default
+index 0ecf14f..174e4ed 100644
+--- a/doc-jp/keymap.default
++++ b/doc-jp/keymap.default
+@@ -11,6 +11,7 @@
+ # Left : LEFT, ^[[D
+
+ keymap C-@ MARK
++keymap C-_ GOTO_HOME
+ keymap C-a LINE_BEGIN
+ keymap C-b MOVE_LEFT
+ keymap C-e LINE_END
diff --git a/doc-jp/keymap.lynx b/doc-jp/keymap.lynx
index 869c716..e4085c8 100644
--- a/doc-jp/keymap.lynx
@@ -11435,10 +11537,10 @@ index b8f5b94..7f7ae2b 100644
From: "OMAE, jun" <jun-o@osb.att.ne.jp>
diff --git a/doc/MANUAL.html b/doc/MANUAL.html
-index aff0189..f0710a7 100644
+index aff0189..91a3485 100644
--- a/doc/MANUAL.html
+++ b/doc/MANUAL.html
-@@ -1,535 +1,2424 @@
+@@ -1,535 +1,2437 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -13301,6 +13403,19 @@ index aff0189..f0710a7 100644
+ </tr>
+ <tr>
+ <td>
++ GOTO_HOME
++ </td>
++ <td>
++ C-_
++ </td>
++ <td>
++ </td>
++ <td>
++ Return to the homepage (specified HTTP_HOME or WWW_HOME variable)
++ </td>
++ </tr>
++ <tr>
++ <td>
+ SELECT_MENU
+ </td>
+ <td>
@@ -14453,10 +14568,10 @@ index bd82cdb..88f4b1a 100644
Then find or install a CGI program which takes a word as a query
diff --git a/doc/README.func b/doc/README.func
-index 0b2c034..a3ef3ac 100644
+index 0b2c034..0430855 100644
--- a/doc/README.func
+++ b/doc/README.func
-@@ -1,145 +1,146 @@
+@@ -1,145 +1,147 @@
-ABORT Quit w3m without confirmation
-ACCESSSKEY Popup acceskey menu
-ADD_BOOKMARK Add current page to bookmark
@@ -14524,6 +14639,7 @@ index 0b2c034..a3ef3ac 100644
+EXTERN_LINK Display target using an external browser
+FRAME Toggle rendering HTML frames
+GOTO Open specified document in a new buffer
++GOTO_HOME Return to the homepage (specified HTTP_HOME or WWW_HOME variable)
+GOTO_LINE Go to the specified line
+GOTO_LINK Follow current hyperlink in a new buffer
+GOTO_RELATIVE Go to relative address
@@ -14866,10 +14982,10 @@ index 972ef90..dad62f8 100644
diff --git a/doc/README.siteconf b/doc/README.siteconf
new file mode 100644
-index 0000000..39b1028
+index 0000000..5eb2554
--- /dev/null
+++ b/doc/README.siteconf
-@@ -0,0 +1,60 @@
+@@ -0,0 +1,67 @@
+The siteconf: Site-specific preferences
+
+The siteconf consists of URL patterns and preferences associated to them.
@@ -14885,6 +15001,7 @@ index 0000000..39b1028
+url_charset <charset>
+no_referer_from on|off
+no_referer_to on|off
++user_agent "string"
+
+The last match wins.
+
@@ -14912,6 +15029,12 @@ index 0000000..39b1028
+When combinated with "decode_url" option turned on, links to
+Wikipedia will be human-readable.
+
++url m@^https?://(.*\.)google\.com/@
++user_agent "Lynx/2.8.8dev.3 libwww-FM/2.14 SSL-MM/1.4.1"
++
++Tell Google we're actually Lynx. (So they send us a text-browser friendly
++results page.)
++
+===== Regular expressions notes =====
+
+Following expressions are all equivalent:
@@ -14976,6 +15099,18 @@ index 8e98e1c..f237f70 100644
+diff --git a/doc/keymap.default b/doc/keymap.default
+index 0ecf14f..174e4ed 100644
+--- a/doc/keymap.default
++++ b/doc/keymap.default
+@@ -11,6 +11,7 @@
+ # Left : LEFT, ^[[D
+
+ keymap C-@ MARK
++keymap C-_ GOTO_HOME
+ keymap C-a LINE_BEGIN
+ keymap C-b MOVE_LEFT
+ keymap C-e LINE_END
diff --git a/doc/keymap.lynx b/doc/keymap.lynx
index 869c716..e4085c8 100644
--- a/doc/keymap.lynx
@@ -15491,6 +15626,19 @@ index fdd8f64..45dc95e 100644
if (c < 0x100) { /* Latin1 (ISO 8859-1) */
if (UseAltEntity)
return alt_latin1[c - 0xa0];
+diff --git a/entity.tab b/entity.tab
+index 130ae2d..d481312 100644
+--- a/entity.tab
++++ b/entity.tab
+@@ -7,6 +7,8 @@ amp 0x26
+ AMP 0x26
+ quot 0x22
+ QUOT 0x22
++apos 0x27
++APOS 0x27
+ nbsp 0xA0
+ NBSP 0xA0
+ iexcl 0xA1
diff --git a/etc.c b/etc.c
index 8fe1215..37c4f15 100644
--- a/etc.c
@@ -17025,7 +17173,7 @@ index 567d41e..0333e9a 100644
}
ungetc(c, fp);
diff --git a/fm.h b/fm.h
-index 8378939..96d3ab3 100644
+index 8378939..4a17ecc 100644
--- a/fm.h
+++ b/fm.h
@@ -76,6 +76,7 @@ typedef int wc_ces; /* XXX: not used */
@@ -17036,7 +17184,7 @@ index 8378939..96d3ab3 100644
#ifndef HAVE_BCOPY
void bcopy(const void *, void *, int);
-@@ -264,6 +265,18 @@ extern int REV_LB[];
+@@ -264,6 +265,20 @@ extern int REV_LB[];
#define IMG_FLAG_ERROR 2
#define IMG_FLAG_DONT_REMOVE 4
@@ -17046,8 +17194,10 @@ index 8378939..96d3ab3 100644
+#define SCONF_URL_CHARSET 2
+#define SCONF_NO_REFERER_FROM 3
+#define SCONF_NO_REFERER_TO 4
-+#define SCONF_N_FIELD 5
++#define SCONF_USER_AGENT 5
++#define SCONF_N_FIELD 6
+#define query_SCONF_SUBSTITUTE_URL(pu) ((const char *)querySiteconf(pu, SCONF_SUBSTITUTE_URL))
++#define query_SCONF_USER_AGENT(pu) ((const char *)querySiteconf(pu, SCONF_USER_AGENT))
+#define query_SCONF_URL_CHARSET(pu) ((const wc_ces *)querySiteconf(pu, SCONF_URL_CHARSET))
+#define query_SCONF_NO_REFERER_FROM(pu) ((const int *)querySiteconf(pu, SCONF_NO_REFERER_FROM))
+#define query_SCONF_NO_REFERER_TO(pu) ((const int *)querySiteconf(pu, SCONF_NO_REFERER_TO))
@@ -17055,7 +17205,7 @@ index 8378939..96d3ab3 100644
/*
* Macros.
*/
-@@ -276,8 +289,6 @@ extern int REV_LB[];
+@@ -276,8 +291,6 @@ extern int REV_LB[];
#define inputFilenameHist(p,d,h) inputLineHist(p,d,IN_FILENAME,h)
#define inputChar(p) inputLine(p,"",IN_CHAR)
@@ -17064,7 +17214,7 @@ index 8378939..96d3ab3 100644
#ifdef __EMX__
#define HAVE_STRCASECMP
#define strcasecmp stricmp
-@@ -362,6 +373,8 @@ typedef struct _imageCache {
+@@ -362,6 +375,8 @@ typedef struct _imageCache {
int index;
short width;
short height;
@@ -17073,7 +17223,7 @@ index 8378939..96d3ab3 100644
} ImageCache;
typedef struct _image {
-@@ -562,6 +575,13 @@ typedef struct _DownloadList {
+@@ -562,6 +577,13 @@ typedef struct _DownloadList {
#define INIT_BUFFER_WIDTH ((_INIT_BUFFER_WIDTH > 0) ? _INIT_BUFFER_WIDTH : 0)
#define FOLD_BUFFER_WIDTH (FoldLine ? (INIT_BUFFER_WIDTH + 1) : -1)
@@ -17087,7 +17237,7 @@ index 8378939..96d3ab3 100644
typedef struct {
int pos;
int len;
-@@ -569,6 +589,7 @@ typedef struct {
+@@ -569,6 +591,7 @@ typedef struct {
long flag;
Anchor anchor;
Str img_alt;
@@ -17095,7 +17245,7 @@ index 8378939..96d3ab3 100644
char fontstat[FONTSTAT_SIZE];
short nobr_level;
Lineprop prev_ctype;
-@@ -591,6 +612,7 @@ struct readbuffer {
+@@ -591,6 +614,7 @@ struct readbuffer {
short nobr_level;
Anchor anchor;
Str img_alt;
@@ -17103,7 +17253,7 @@ index 8378939..96d3ab3 100644
char fontstat[FONTSTAT_SIZE];
char fontstat_stack[FONT_STACK_SIZE][FONTSTAT_SIZE];
int fontstat_sp;
-@@ -802,7 +824,7 @@ global char PermitSaveToPipe init(FALSE);
+@@ -802,7 +826,7 @@ global char PermitSaveToPipe init(FALSE);
global char DecodeCTE init(FALSE);
global char AutoUncompress init(FALSE);
global char PreserveTimestamp init(TRUE);
@@ -17112,7 +17262,7 @@ index 8378939..96d3ab3 100644
global char MetaRefresh init(FALSE);
global char fmInitialized init(FALSE);
-@@ -874,6 +896,9 @@ global char *index_file init(NULL);
+@@ -874,6 +898,9 @@ global char *index_file init(NULL);
global char *CurrentDir;
global int CurrentPid;
@@ -17122,7 +17272,7 @@ index 8378939..96d3ab3 100644
/*
* global Buffer *Currentbuf;
* global Buffer *Firstbuf;
-@@ -896,6 +921,7 @@ global char *CurrentKeyData;
+@@ -896,6 +923,7 @@ global char *CurrentKeyData;
global char *CurrentCmdData;
global char *w3m_reqlog;
extern char *w3m_version;
@@ -17130,7 +17280,15 @@ index 8378939..96d3ab3 100644
#define DUMP_BUFFER 0x01
#define DUMP_HEAD 0x02
-@@ -968,10 +994,17 @@ global int MailtoOptions init(MAILTO_OPTIONS_IGNORE);
+@@ -909,6 +937,7 @@ global int w3m_dump init(0);
+ global int w3m_halfload init(FALSE);
+ global Str header_string init(NULL);
+ global int override_content_type init(FALSE);
++global int override_user_agent init(FALSE);
+
+ #ifdef USE_COLOR
+ global int useColor init(TRUE);
+@@ -968,10 +997,17 @@ global int MailtoOptions init(MAILTO_OPTIONS_IGNORE);
global char *ExtBrowser init(DEF_EXT_BROWSER);
global char *ExtBrowser2 init(NULL);
global char *ExtBrowser3 init(NULL);
@@ -17148,7 +17306,7 @@ index 8378939..96d3ab3 100644
global char *ftppasswd init(NULL);
global int ftppass_hostnamegen init(TRUE);
global int do_download init(FALSE);
-@@ -991,7 +1024,7 @@ global char *BookmarkFile init(NULL);
+@@ -991,7 +1027,7 @@ global char *BookmarkFile init(NULL);
global int UseExternalDirBuffer init(TRUE);
global char *DirBufferCommand init("file:///$LIB/dirlist" CGI_EXTENSION);
#ifdef USE_DICT
@@ -17157,7 +17315,7 @@ index 8378939..96d3ab3 100644
global char *DictCommand init("file:///$LIB/w3mdict" CGI_EXTENSION);
#endif /* USE_DICT */
global int ignore_null_img_alt init(TRUE);
-@@ -1004,7 +1037,7 @@ global int FoldLine init(FALSE);
+@@ -1004,7 +1040,7 @@ global int FoldLine init(FALSE);
#define DEFAULT_URL_EMPTY 0
#define DEFAULT_URL_CURRENT 1
#define DEFAULT_URL_LINK 2
@@ -17166,7 +17324,7 @@ index 8378939..96d3ab3 100644
global int MarkAllPages init(FALSE);
#ifdef USE_MIGEMO
-@@ -1065,16 +1098,18 @@ global char SimplePreserveSpace init(FALSE);
+@@ -1065,16 +1101,18 @@ global char SimplePreserveSpace init(FALSE);
#define wc_Str_conv(x,charset0,charset1) (x)
#define wc_Str_conv_strict(x,charset0,charset1) (x)
#endif
@@ -17186,7 +17344,7 @@ index 8378939..96d3ab3 100644
#define SYMBOL_BASE 0x20
global int no_rc_dir init(FALSE);
global char *rc_dir init(NULL);
-@@ -1113,9 +1148,9 @@ global MouseAction mouse_action;
+@@ -1113,9 +1151,9 @@ global MouseAction mouse_action;
#ifdef USE_COOKIE
global int default_use_cookie init(TRUE);
@@ -17199,7 +17357,7 @@ index 8378939..96d3ab3 100644
#define ACCEPT_BAD_COOKIE_DISCARD 0
#define ACCEPT_BAD_COOKIE_ACCEPT 1
#define ACCEPT_BAD_COOKIE_ASK 2
-@@ -1135,7 +1170,7 @@ global int view_unseenobject init(TRUE);
+@@ -1135,7 +1173,7 @@ global int view_unseenobject init(TRUE);
#endif
#if defined(USE_SSL) && defined(USE_SSL_VERIFY)
@@ -17208,7 +17366,7 @@ index 8378939..96d3ab3 100644
global char *ssl_cert_file init(NULL);
global char *ssl_key_file init(NULL);
global char *ssl_ca_path init(NULL);
-@@ -1144,15 +1179,17 @@ global int ssl_path_modified init(FALSE);
+@@ -1144,15 +1182,17 @@ global int ssl_path_modified init(FALSE);
#endif /* defined(USE_SSL) &&
* defined(USE_SSL_VERIFY) */
#ifdef USE_SSL
@@ -18169,9 +18327,27 @@ index 5f5991a..91034ee 100644
if (cache->width == 0)
cache->width = 1;
diff --git a/indep.c b/indep.c
-index 65b04aa..5c5de06 100644
+index 65b04aa..4957c67 100644
--- a/indep.c
+++ b/indep.c
+@@ -19,7 +19,7 @@ unsigned char QUOTE_MAP[0x100] = {
+ /* DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US */
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ /* SPC ! " # $ % & ' ( ) * + , - . / */
+- 24, 72, 76, 40, 8, 40, 41, 72, 72, 72, 72, 40, 72, 8, 0, 64,
++ 24, 72, 76, 40, 8, 40, 41, 77, 72, 72, 72, 40, 72, 8, 0, 64,
+ /* 0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 72, 74, 72, 75, 40,
+ /* @ A B C D E F G H I J K L M N O */
+@@ -47,7 +47,7 @@ char *HTML_QUOTE_MAP[] = {
+ "&lt;",
+ "&gt;",
+ "&quot;",
+- NULL,
++ "&apos;",
+ NULL,
+ NULL,
+ };
@@ -357,6 +357,20 @@ strcasemstr(char *str, char *srch[], char **ret_ptr)
return -1;
}
@@ -18193,6 +18369,15 @@ index 65b04aa..5c5de06 100644
char *
remove_space(char *str)
{
+@@ -448,7 +462,7 @@ getescapechar(char **str)
+ q = p;
+ for (p++; IS_ALNUM(*p); p++) ;
+ q = allocStr(q, p - q);
+- if (strcasestr("lt gt amp quot nbsp", q) && *p != '=') {
++ if (strcasestr("lt gt amp quot apos nbsp", q) && *p != '=') {
+ /* a character entity MUST be terminated with ";". However,
+ * there's MANY web pages which uses &lt , &gt or something
+ * like them as &lt;, &gt;, etc. Therefore, we treat the most
@@ -707,6 +721,111 @@ shell_quote(char *str)
return str;
}
@@ -18306,7 +18491,7 @@ index 65b04aa..5c5de06 100644
w3m_dir(const char *name, char *dft)
{
diff --git a/indep.h b/indep.h
-index b3819a3..2809832 100644
+index b3819a3..5c6b1da 100644
--- a/indep.h
+++ b/indep.h
@@ -1,7 +1,7 @@
@@ -18333,6 +18518,15 @@ index b3819a3..2809832 100644
#define RAW_MODE 0
#define PAGER_MODE 1
#define HTML_MODE 2
+@@ -19,7 +27,7 @@
+
+ extern unsigned char QUOTE_MAP[];
+ extern char *HTML_QUOTE_MAP[];
+-#define HTML_QUOTE_MASK 0x07 /* &, <, >, " */
++#define HTML_QUOTE_MASK 0x07 /* &, <, >, ", ' */
+ #define SHELL_UNSAFE_MASK 0x08 /* [^A-Za-z0-9_./:\200-\377] */
+ #define URL_QUOTE_MASK 0x10 /* [\0- \177-\377] */
+ #define FILE_QUOTE_MASK 0x30 /* [\0- #%&+:?\177-\377] */
@@ -52,6 +60,7 @@ extern int strncasecmp(const char *s1, const char *s2, size_t n);
extern char *strcasestr(const char *s1, const char *s2);
#endif
@@ -18879,9 +19073,18 @@ index a220d8b..5a04be0 100644
extern int ISeos(InputStream stream);
#ifdef USE_SSL
diff --git a/keybind.c b/keybind.c
-index a490962..fec0c65 100644
+index a490962..e9ef08b 100644
--- a/keybind.c
+++ b/keybind.c
+@@ -13,7 +13,7 @@ unsigned char GlobalKeymap[128] = {
+ /* C-p C-q C-r C-s C-t C-u C-v C-w */
+ movU, closeT, isrchbak, isrchfor, tabA, prevA, pgFore, wrapToggle,
+ /* C-x C-y C-z C-[ C-\ C-] C-^ C-_ */
+- nulcmd, nulcmd, susp, escmap, nulcmd, nulcmd, nulcmd, nulcmd,
++ nulcmd, nulcmd, susp, escmap, nulcmd, nulcmd, nulcmd, goHome,
+ /* SPC ! " # $ % & ' */
+ pgFore, execsh, reMark, pipesh, linend, nulcmd, nulcmd, nulcmd,
+ /* ( ) * + , - . / */
@@ -91,7 +91,7 @@ unsigned char EscBKeymap[128] = {
/* 0 1 2 3 4 5 6 7 */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
@@ -19926,7 +20129,7 @@ index c0461df..f0c6242 100644
int quoted;
char *q = NULL;
diff --git a/main.c b/main.c
-index b421943..43e181c 100644
+index b421943..2fcc60c 100644
--- a/main.c
+++ b/main.c
@@ -1,6 +1,7 @@
@@ -19993,7 +20196,16 @@ index b421943..43e181c 100644
fprintf(f, " -X don't use termcap init/deinit\n");
fprintf(f,
" -title[=TERM] set buffer name to terminal title string\n");
-@@ -372,6 +384,13 @@ make_optional_header_string(char *s)
+@@ -363,6 +375,8 @@ make_optional_header_string(char *s)
+ Strcopy_charp_n(hs, s, p - s);
+ if (!Strcasecmp_charp(hs, "content-type"))
+ override_content_type = TRUE;
++ if (!Strcasecmp_charp(hs, "user-agent"))
++ override_user_agent = TRUE;
+ Strcat_charp(hs, ": ");
+ if (*(++p)) { /* not null header */
+ SKIP_BLANKS(p); /* skip white spaces */
+@@ -372,12 +386,19 @@ make_optional_header_string(char *s)
return hs;
}
@@ -20007,7 +20219,15 @@ index b421943..43e181c 100644
int
main(int argc, char **argv, char **envp)
{
-@@ -397,7 +416,15 @@ main(int argc, char **argv, char **envp)
+ Buffer *newbuf = NULL;
+- char *p, c;
+- int i;
++ char *p;
++ int c, i;
+ InputStream redin;
+ char *line_str = NULL;
+ char **load_argv;
+@@ -397,7 +418,15 @@ main(int argc, char **argv, char **envp)
wc_ces CodePage;
#endif
#endif
@@ -20023,7 +20243,7 @@ index b421943..43e181c 100644
#if defined(ENABLE_NLS) || (defined(USE_M17N) && defined(HAVE_LANGINFO_CODESET))
setlocale(LC_ALL, "");
#endif
-@@ -418,6 +445,10 @@ main(int argc, char **argv, char **envp)
+@@ -418,6 +447,10 @@ main(int argc, char **argv, char **envp)
CurrentDir = currentdir();
CurrentPid = (int)getpid();
@@ -20034,7 +20254,7 @@ index b421943..43e181c 100644
BookmarkFile = NULL;
config_file = NULL;
-@@ -530,12 +561,14 @@ main(int argc, char **argv, char **envp)
+@@ -530,12 +563,14 @@ main(int argc, char **argv, char **envp)
PagerMax = atoi(argv[i]);
}
#ifdef USE_M17N
@@ -20049,7 +20269,7 @@ index b421943..43e181c 100644
else if (!strncmp("-I", argv[i], 2)) {
if (argv[i][2] != '\0')
p = argv[i] + 2;
-@@ -660,6 +693,12 @@ main(int argc, char **argv, char **envp)
+@@ -660,6 +695,12 @@ main(int argc, char **argv, char **envp)
}
}
#endif
@@ -20062,7 +20282,7 @@ index b421943..43e181c 100644
else if (!strcmp("-num", argv[i]))
showLineNum = TRUE;
else if (!strcmp("-no-proxy", argv[i]))
-@@ -703,7 +742,11 @@ main(int argc, char **argv, char **envp)
+@@ -703,7 +744,11 @@ main(int argc, char **argv, char **envp)
accept_cookie = TRUE;
}
#endif /* USE_COOKIE */
@@ -20074,7 +20294,7 @@ index b421943..43e181c 100644
squeezeBlankLine = TRUE;
else if (!strcmp("-X", argv[i]))
Do_not_use_ti_te = TRUE;
-@@ -735,6 +778,15 @@ main(int argc, char **argv, char **envp)
+@@ -735,6 +780,15 @@ main(int argc, char **argv, char **envp)
else if (!strcmp("-reqlog",argv[i])) {
w3m_reqlog=rcFile("request.log");
}
@@ -20090,7 +20310,7 @@ index b421943..43e181c 100644
else {
usage();
}
-@@ -823,6 +875,30 @@ main(int argc, char **argv, char **envp)
+@@ -823,6 +877,30 @@ main(int argc, char **argv, char **envp)
if (w3m_backend)
backend();
@@ -20121,7 +20341,7 @@ index b421943..43e181c 100644
if (w3m_dump)
mySignal(SIGINT, SIG_IGN);
-@@ -833,7 +909,12 @@ main(int argc, char **argv, char **envp)
+@@ -833,7 +911,12 @@ main(int argc, char **argv, char **envp)
mySignal(SIGPIPE, SigPipe);
#endif
@@ -20134,7 +20354,7 @@ index b421943..43e181c 100644
err_msg = Strnew();
if (load_argc == 0) {
/* no URL specified */
-@@ -894,12 +975,17 @@ main(int argc, char **argv, char **envp)
+@@ -894,12 +977,17 @@ main(int argc, char **argv, char **envp)
if (i >= 0) {
SearchHeader = search_header;
DefaultType = default_type;
@@ -20155,7 +20375,7 @@ index b421943..43e181c 100644
}
else {
if (post_file && i == 0) {
-@@ -928,9 +1014,7 @@ main(int argc, char **argv, char **envp)
+@@ -928,9 +1016,7 @@ main(int argc, char **argv, char **envp)
else {
request = NULL;
}
@@ -20166,7 +20386,7 @@ index b421943..43e181c 100644
}
if (newbuf == NULL) {
/* FIXME: gettextize? */
-@@ -945,7 +1029,7 @@ main(int argc, char **argv, char **envp)
+@@ -945,7 +1031,7 @@ main(int argc, char **argv, char **envp)
break;
case SCM_LOCAL:
case SCM_LOCAL_CGI:
@@ -20175,7 +20395,7 @@ index b421943..43e181c 100644
default:
pushHashHist(URLHist, parsedURL2Str(&newbuf->currentURL)->ptr);
break;
-@@ -1183,13 +1267,13 @@ static void
+@@ -1183,13 +1269,13 @@ static void
dump_source(Buffer *buf)
{
FILE *f;
@@ -20191,7 +20411,7 @@ index b421943..43e181c 100644
putchar(c);
}
fclose(f);
-@@ -1246,6 +1330,12 @@ dump_extra(Buffer *buf)
+@@ -1246,6 +1332,12 @@ dump_extra(Buffer *buf)
#endif
}
@@ -20204,7 +20424,7 @@ index b421943..43e181c 100644
static void
do_dump(Buffer *buf)
{
-@@ -1266,18 +1356,20 @@ do_dump(Buffer *buf)
+@@ -1266,18 +1358,20 @@ do_dump(Buffer *buf)
int i;
saveBuffer(buf, stdout, FALSE);
if (displayLinkNumber && buf->href) {
@@ -20235,7 +20455,7 @@ index b421943..43e181c 100644
}
}
}
-@@ -1547,7 +1639,7 @@ nscroll(int n, int mode)
+@@ -1547,7 +1641,7 @@ nscroll(int n, int mode)
}
/* Move page forward */
@@ -20244,7 +20464,7 @@ index b421943..43e181c 100644
{
if (vi_prec_num)
nscroll(searchKeyNum() * (Currentbuf->LINES - 1), B_NORMAL);
-@@ -1557,7 +1649,7 @@ DEFUN(pgFore, NEXT_PAGE, "Move to next page")
+@@ -1557,7 +1651,7 @@ DEFUN(pgFore, NEXT_PAGE, "Move to next page")
}
/* Move page backward */
@@ -20253,7 +20473,7 @@ index b421943..43e181c 100644
{
if (vi_prec_num)
nscroll(-searchKeyNum() * (Currentbuf->LINES - 1), B_NORMAL);
-@@ -1566,20 +1658,32 @@ DEFUN(pgBack, PREV_PAGE, "Move to previous page")
+@@ -1566,20 +1660,32 @@ DEFUN(pgBack, PREV_PAGE, "Move to previous page")
* (Currentbuf->LINES - 1)), prec_num ? B_SCROLL : B_NORMAL);
}
@@ -20289,7 +20509,7 @@ index b421943..43e181c 100644
{
int offsety;
if (Currentbuf->firstLine == NULL)
-@@ -1598,7 +1702,7 @@ DEFUN(ctrCsrV, CENTER_V, "Move to the center column")
+@@ -1598,7 +1704,7 @@ DEFUN(ctrCsrV, CENTER_V, "Move to the center column")
}
}
@@ -20298,7 +20518,7 @@ index b421943..43e181c 100644
{
int offsetx;
if (Currentbuf->firstLine == NULL)
-@@ -1612,7 +1716,7 @@ DEFUN(ctrCsrH, CENTER_H, "Move to the center line")
+@@ -1612,7 +1718,7 @@ DEFUN(ctrCsrH, CENTER_H, "Move to the center line")
}
/* Redraw screen */
@@ -20307,7 +20527,7 @@ index b421943..43e181c 100644
{
clear();
arrangeCursor(Currentbuf);
-@@ -1844,19 +1948,23 @@ srch_nxtprv(int reverse)
+@@ -1844,19 +1950,23 @@ srch_nxtprv(int reverse)
result = srchcore(SearchString, routine[reverse]);
if (result & SR_FOUND)
clear_mark(Currentbuf->currentLine);
@@ -20333,7 +20553,7 @@ index b421943..43e181c 100644
{
srch_nxtprv(1);
}
-@@ -1919,7 +2027,7 @@ DEFUN(col1R, RIGHT, "Shift screen one column right")
+@@ -1919,7 +2029,7 @@ DEFUN(col1R, RIGHT, "Shift screen one column right")
displayBuffer(Currentbuf, B_NORMAL);
}
@@ -20342,7 +20562,7 @@ index b421943..43e181c 100644
{
Buffer *buf = Currentbuf;
Line *l = buf->currentLine;
-@@ -1960,7 +2068,7 @@ DEFUN(setEnv, SETENV, "Set environment variable")
+@@ -1960,7 +2070,7 @@ DEFUN(setEnv, SETENV, "Set environment variable")
displayBuffer(Currentbuf, B_NORMAL);
}
@@ -20351,7 +20571,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
char *cmd, *tmpf;
-@@ -2006,7 +2114,7 @@ DEFUN(pipeBuf, PIPE_BUF, "Send rendered document to pipe")
+@@ -2006,7 +2116,7 @@ DEFUN(pipeBuf, PIPE_BUF, "Send rendered document to pipe")
}
/* Execute shell command and read output ac pipe. */
@@ -20360,7 +20580,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
char *cmd;
-@@ -2037,7 +2145,7 @@ DEFUN(pipesh, PIPE_SHELL, "Execute shell command and browse")
+@@ -2037,7 +2147,7 @@ DEFUN(pipesh, PIPE_SHELL, "Execute shell command and browse")
}
/* Execute shell command and load entire output to buffer */
@@ -20369,7 +20589,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
MySignalHandler(*prevtrap) ();
-@@ -2074,7 +2182,7 @@ DEFUN(readsh, READ_SHELL, "Execute shell command and load")
+@@ -2074,7 +2184,7 @@ DEFUN(readsh, READ_SHELL, "Execute shell command and load")
}
/* Execute shell command */
@@ -20378,7 +20598,7 @@ index b421943..43e181c 100644
{
char *cmd;
-@@ -2099,7 +2207,7 @@ DEFUN(execsh, EXEC_SHELL SHELL, "Execute shell command")
+@@ -2099,7 +2209,7 @@ DEFUN(execsh, EXEC_SHELL SHELL, "Execute shell command")
}
/* Load file */
@@ -20387,7 +20607,7 @@ index b421943..43e181c 100644
{
char *fn;
-@@ -2118,7 +2226,7 @@ DEFUN(ldfile, LOAD, "Load local file")
+@@ -2118,7 +2228,7 @@ DEFUN(ldfile, LOAD, "Load local file")
}
/* Load help file */
@@ -20396,7 +20616,7 @@ index b421943..43e181c 100644
{
#ifdef USE_HELP_CGI
char *lang;
-@@ -2167,13 +2275,12 @@ _movL(int n)
+@@ -2167,13 +2277,12 @@ _movL(int n)
displayBuffer(Currentbuf, B_NORMAL);
}
@@ -20412,7 +20632,7 @@ index b421943..43e181c 100644
{
_movL(1);
}
-@@ -2190,14 +2297,12 @@ _movD(int n)
+@@ -2190,14 +2299,12 @@ _movD(int n)
displayBuffer(Currentbuf, B_NORMAL);
}
@@ -20429,7 +20649,7 @@ index b421943..43e181c 100644
{
_movD(1);
}
-@@ -2214,13 +2319,12 @@ _movU(int n)
+@@ -2214,13 +2321,12 @@ _movU(int n)
displayBuffer(Currentbuf, B_NORMAL);
}
@@ -20445,7 +20665,7 @@ index b421943..43e181c 100644
{
_movU(1);
}
-@@ -2237,14 +2341,12 @@ _movR(int n)
+@@ -2237,14 +2343,12 @@ _movR(int n)
displayBuffer(Currentbuf, B_NORMAL);
}
@@ -20462,7 +20682,7 @@ index b421943..43e181c 100644
{
_movR(1);
}
-@@ -2261,7 +2363,7 @@ DEFUN(movR1, MOVE_RIGHT1,
+@@ -2261,7 +2365,7 @@ DEFUN(movR1, MOVE_RIGHT1,
static wc_uint32
getChar(char *p)
{
@@ -20471,7 +20691,7 @@ index b421943..43e181c 100644
}
static int
-@@ -2296,7 +2398,7 @@ prev_nonnull_line(Line *line)
+@@ -2296,7 +2400,7 @@ prev_nonnull_line(Line *line)
return 0;
}
@@ -20480,7 +20700,7 @@ index b421943..43e181c 100644
{
char *lb;
Line *pline, *l;
-@@ -2364,7 +2466,7 @@ next_nonnull_line(Line *line)
+@@ -2364,7 +2468,7 @@ next_nonnull_line(Line *line)
return 0;
}
@@ -20489,7 +20709,7 @@ index b421943..43e181c 100644
{
char *lb;
Line *pline, *l;
-@@ -2442,19 +2544,19 @@ _quitfm(int confirm)
+@@ -2442,19 +2546,19 @@ _quitfm(int confirm)
}
/* Quit */
@@ -20512,7 +20732,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
int ok;
-@@ -2502,7 +2604,7 @@ DEFUN(selBuf, SELECT, "Go to buffer selection panel")
+@@ -2502,7 +2606,7 @@ DEFUN(selBuf, SELECT, "Go to buffer selection panel")
}
/* Suspend (on BSD), or run interactive shell (on SysV) */
@@ -20521,7 +20741,7 @@ index b421943..43e181c 100644
{
#ifndef SIGSTOP
char *shell;
-@@ -2517,7 +2619,17 @@ DEFUN(susp, INTERRUPT SUSPEND, "Stop loading document")
+@@ -2517,7 +2621,17 @@ DEFUN(susp, INTERRUPT SUSPEND, "Stop loading document")
shell = "/bin/sh";
system(shell);
#else /* SIGSTOP */
@@ -20539,7 +20759,7 @@ index b421943..43e181c 100644
#endif /* SIGSTOP */
fmInit();
displayBuffer(Currentbuf, B_FORCE_REDRAW);
-@@ -2550,7 +2662,7 @@ _goLine(char *l)
+@@ -2550,7 +2664,7 @@ _goLine(char *l)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -20548,7 +20768,7 @@ index b421943..43e181c 100644
{
char *str = searchKeyData();
-@@ -2575,7 +2687,7 @@ DEFUN(goLineL, END, "Go to the last line")
+@@ -2575,7 +2689,7 @@ DEFUN(goLineL, END, "Go to the last line")
}
/* Go to the beginning of the line */
@@ -20557,7 +20777,7 @@ index b421943..43e181c 100644
{
if (Currentbuf->firstLine == NULL)
return;
-@@ -2587,7 +2699,7 @@ DEFUN(linbeg, LINE_BEGIN, "Go to the beginning of line")
+@@ -2587,7 +2701,7 @@ DEFUN(linbeg, LINE_BEGIN, "Go to the beginning of line")
}
/* Go to the bottom of the line */
@@ -20566,7 +20786,7 @@ index b421943..43e181c 100644
{
if (Currentbuf->firstLine == NULL)
return;
-@@ -2616,7 +2728,7 @@ cur_real_linenumber(Buffer *buf)
+@@ -2616,7 +2730,7 @@ cur_real_linenumber(Buffer *buf)
}
/* Run editor on the current buffer */
@@ -20575,7 +20795,7 @@ index b421943..43e181c 100644
{
char *fn = Currentbuf->filename;
Str cmd;
-@@ -2643,7 +2755,7 @@ DEFUN(editBf, EDIT, "Edit current document")
+@@ -2643,7 +2757,7 @@ DEFUN(editBf, EDIT, "Edit current document")
}
/* Run editor on the current screen */
@@ -20584,7 +20804,7 @@ index b421943..43e181c 100644
{
char *tmpf;
FILE *f;
-@@ -2681,7 +2793,7 @@ DEFUN(_mark, MARK, "Set/unset mark")
+@@ -2681,7 +2795,7 @@ DEFUN(_mark, MARK, "Set/unset mark")
}
/* Go to next mark */
@@ -20593,7 +20813,7 @@ index b421943..43e181c 100644
{
Line *l;
int i;
-@@ -2714,7 +2826,7 @@ DEFUN(nextMk, NEXT_MARK, "Move to next word")
+@@ -2714,7 +2828,7 @@ DEFUN(nextMk, NEXT_MARK, "Move to next word")
}
/* Go to previous mark */
@@ -20602,7 +20822,7 @@ index b421943..43e181c 100644
{
Line *l;
int i;
-@@ -2749,7 +2861,7 @@ DEFUN(prevMk, PREV_MARK, "Move to previous mark")
+@@ -2749,7 +2863,7 @@ DEFUN(prevMk, PREV_MARK, "Move to previous mark")
}
/* Mark place to which the regular expression matches */
@@ -20611,7 +20831,7 @@ index b421943..43e181c 100644
{
Line *l;
char *str;
-@@ -2804,12 +2916,15 @@ loadLink(char *url, char *target, char *referer, FormList *request)
+@@ -2804,12 +2918,15 @@ loadLink(char *url, char *target, char *referer, FormList *request)
union frameset_element *f_element = NULL;
int flag = 0;
ParsedURL *base, pu;
@@ -20628,7 +20848,7 @@ index b421943..43e181c 100644
base->scheme == SCM_LOCAL || base->scheme == SCM_LOCAL_CGI)
referer = NO_REFERER;
if (referer == NULL)
-@@ -2830,7 +2945,7 @@ loadLink(char *url, char *target, char *referer, FormList *request)
+@@ -2830,7 +2947,7 @@ loadLink(char *url, char *target, char *referer, FormList *request)
if (!on_target) /* open link as an indivisual page */
return loadNormalBuf(buf, TRUE);
@@ -20637,7 +20857,7 @@ index b421943..43e181c 100644
return loadNormalBuf(buf, FALSE);
if (target == NULL || /* no target specified (that means this page is not a frame page) */
-@@ -2959,9 +3074,8 @@ handleMailto(char *url)
+@@ -2959,9 +3076,8 @@ handleMailto(char *url)
}
/* follow HREF link */
@@ -20648,7 +20868,7 @@ index b421943..43e181c 100644
Anchor *a;
ParsedURL u;
#ifdef USE_IMAGE
-@@ -2971,7 +3085,6 @@ DEFUN(followA, GOTO_LINK, "Go to current link")
+@@ -2971,7 +3087,6 @@ DEFUN(followA, GOTO_LINK, "Go to current link")
if (Currentbuf->firstLine == NULL)
return;
@@ -20656,7 +20876,7 @@ index b421943..43e181c 100644
#ifdef USE_IMAGE
a = retrieveCurrentImg(Currentbuf);
-@@ -3051,15 +3164,13 @@ bufferA(void)
+@@ -3051,15 +3166,13 @@ bufferA(void)
}
/* view inline image */
@@ -20673,7 +20893,7 @@ index b421943..43e181c 100644
a = retrieveCurrentImg(Currentbuf);
if (a == NULL)
-@@ -3309,7 +3420,6 @@ followForm(void)
+@@ -3309,7 +3422,6 @@ followForm(void)
static void
_followForm(int submit)
{
@@ -20681,7 +20901,7 @@ index b421943..43e181c 100644
Anchor *a, *a2;
char *p;
FormItemList *fi, *f2;
-@@ -3318,7 +3428,6 @@ _followForm(int submit)
+@@ -3318,7 +3430,6 @@ _followForm(int submit)
if (Currentbuf->firstLine == NULL)
return;
@@ -20689,7 +20909,7 @@ index b421943..43e181c 100644
a = retrieveCurrentForm(Currentbuf);
if (a == NULL)
-@@ -3423,7 +3532,6 @@ _followForm(int submit)
+@@ -3423,7 +3534,6 @@ _followForm(int submit)
case FORM_INPUT_BUTTON:
do_submit:
tmp = Strnew();
@@ -20697,7 +20917,7 @@ index b421943..43e181c 100644
multipart = (fi->parent->method == FORM_METHOD_POST &&
fi->parent->enctype == FORM_ENCTYPE_MULTIPART);
query_from_followform(&tmp, fi, multipart);
-@@ -3501,7 +3609,7 @@ _followForm(int submit)
+@@ -3501,7 +3611,7 @@ _followForm(int submit)
}
/* go to the top anchor */
@@ -20706,7 +20926,7 @@ index b421943..43e181c 100644
{
HmarkerList *hl = Currentbuf->hmarklist;
BufferPoint *po;
-@@ -3534,7 +3642,7 @@ DEFUN(topA, LINK_BEGIN, "Go to the first link")
+@@ -3534,7 +3644,7 @@ DEFUN(topA, LINK_BEGIN, "Go to the first link")
}
/* go to the last anchor */
@@ -20715,7 +20935,7 @@ index b421943..43e181c 100644
{
HmarkerList *hl = Currentbuf->hmarklist;
BufferPoint *po;
-@@ -3568,26 +3676,53 @@ DEFUN(lastA, LINK_END, "Go to the last link")
+@@ -3568,26 +3678,53 @@ DEFUN(lastA, LINK_END, "Go to the last link")
displayBuffer(Currentbuf, B_NORMAL);
}
@@ -20773,7 +20993,7 @@ index b421943..43e181c 100644
{
_prevA(TRUE);
}
-@@ -3863,43 +3998,43 @@ nextY(int d)
+@@ -3863,43 +4000,43 @@ nextY(int d)
}
/* go to the next left anchor */
@@ -20824,7 +21044,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
int i;
-@@ -3917,7 +4052,7 @@ DEFUN(nextBf, NEXT, "Move to next buffer")
+@@ -3917,7 +4054,7 @@ DEFUN(nextBf, NEXT, "Move to next buffer")
}
/* go to the previous bufferr */
@@ -20833,7 +21053,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
int i;
-@@ -3959,7 +4094,7 @@ checkBackBuffer(Buffer *buf)
+@@ -3959,7 +4096,7 @@ checkBackBuffer(Buffer *buf)
}
/* delete current buffer and back to the previous buffer */
@@ -20842,7 +21062,7 @@ index b421943..43e181c 100644
{
Buffer *buf = Currentbuf->linkBuffer[LB_N_FRAME];
-@@ -3970,7 +4105,7 @@ DEFUN(backBf, BACK, "Back to previous buffer")
+@@ -3970,7 +4107,7 @@ DEFUN(backBf, BACK, "Back to previous buffer")
}
else
/* FIXME: gettextize? */
@@ -20851,7 +21071,7 @@ index b421943..43e181c 100644
return;
}
-@@ -4008,8 +4143,7 @@ DEFUN(backBf, BACK, "Back to previous buffer")
+@@ -4008,8 +4145,7 @@ DEFUN(backBf, BACK, "Back to previous buffer")
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -20861,7 +21081,7 @@ index b421943..43e181c 100644
{
Buffer *buf = Currentbuf->nextBuffer;
if (buf)
-@@ -4055,6 +4189,7 @@ goURL0(char *prompt, int relative)
+@@ -4055,6 +4191,7 @@ goURL0(char *prompt, int relative)
char *url, *referer;
ParsedURL p_url, *current;
Buffer *cur_buf = Currentbuf;
@@ -20869,7 +21089,7 @@ index b421943..43e181c 100644
url = searchKeyData();
if (url == NULL) {
-@@ -4064,11 +4199,8 @@ goURL0(char *prompt, int relative)
+@@ -4064,11 +4201,8 @@ goURL0(char *prompt, int relative)
current = baseURL(Currentbuf);
if (current) {
char *c_url = parsedURL2Str(current)->ptr;
@@ -20883,7 +21103,7 @@ index b421943..43e181c 100644
else
pushHist(hist, c_url);
}
-@@ -4077,11 +4209,8 @@ goURL0(char *prompt, int relative)
+@@ -4077,11 +4211,8 @@ goURL0(char *prompt, int relative)
char *a_url;
parseURL2(a->url, &p_url, current);
a_url = parsedURL2Str(&p_url)->ptr;
@@ -20897,7 +21117,7 @@ index b421943..43e181c 100644
else
pushHist(hist, a_url);
}
-@@ -4089,15 +4218,22 @@ goURL0(char *prompt, int relative)
+@@ -4089,15 +4220,22 @@ goURL0(char *prompt, int relative)
if (url != NULL)
SKIP_BLANKS(url);
}
@@ -20927,7 +21147,7 @@ index b421943..43e181c 100644
if (url == NULL || *url == '\0') {
displayBuffer(Currentbuf, B_FORCE_REDRAW);
return;
-@@ -4106,14 +4242,6 @@ goURL0(char *prompt, int relative)
+@@ -4106,14 +4244,6 @@ goURL0(char *prompt, int relative)
gotoLabel(url + 1);
return;
}
@@ -20942,7 +21162,7 @@ index b421943..43e181c 100644
parseURL2(url, &p_url, current);
pushHashHist(URLHist, parsedURL2Str(&p_url)->ptr);
cmd_loadURL(url, current, referer, NULL);
-@@ -4121,12 +4249,12 @@ goURL0(char *prompt, int relative)
+@@ -4121,12 +4251,29 @@ goURL0(char *prompt, int relative)
pushHashHist(URLHist, parsedURL2Str(&Currentbuf->currentURL)->ptr);
}
@@ -20953,11 +21173,28 @@ index b421943..43e181c 100644
}
-DEFUN(gorURL, GOTO_RELATIVE, "Go to relative URL")
++DEFUN(goHome, GOTO_HOME, "Open home page in a new buffer")
++{
++ char *url;
++ if ((url = getenv("HTTP_HOME")) != NULL ||
++ (url = getenv("WWW_HOME")) != NULL) {
++ ParsedURL p_url;
++ Buffer *cur_buf = Currentbuf;
++ SKIP_BLANKS(url);
++ url = url_encode(url, NULL, 0);
++ parseURL2(url, &p_url, NULL);
++ pushHashHist(URLHist, parsedURL2Str(&p_url)->ptr);
++ cmd_loadURL(url, NULL, NULL, NULL);
++ if (Currentbuf != cur_buf) /* success */
++ pushHashHist(URLHist, parsedURL2Str(&Currentbuf->currentURL)->ptr);
++ }
++}
++
+DEFUN(gorURL, GOTO_RELATIVE, "Go to relative address")
{
goURL0("Goto relative URL: ", TRUE);
}
-@@ -4151,14 +4279,14 @@ cmd_loadBuffer(Buffer *buf, int prop, int linkid)
+@@ -4151,14 +4298,14 @@ cmd_loadBuffer(Buffer *buf, int prop, int linkid)
}
/* load bookmark */
@@ -20974,7 +21211,7 @@ index b421943..43e181c 100644
{
Str tmp;
FormList *request;
-@@ -4188,7 +4316,7 @@ DEFUN(adBmark, ADD_BOOKMARK, "Add current page to bookmark")
+@@ -4188,7 +4335,7 @@ DEFUN(adBmark, ADD_BOOKMARK, "Add current page to bookmark")
}
/* option setting */
@@ -20983,7 +21220,7 @@ index b421943..43e181c 100644
{
cmd_loadBuffer(load_option_panel(), BP_NO_URL, LB_NOLINK);
}
-@@ -4223,7 +4351,7 @@ DEFUN(msgs, MSGS, "Display error messages")
+@@ -4223,7 +4370,7 @@ DEFUN(msgs, MSGS, "Display error messages")
}
/* page info */
@@ -20992,7 +21229,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
-@@ -4291,7 +4419,7 @@ follow_map(struct parsed_tagarg *arg)
+@@ -4291,7 +4438,7 @@ follow_map(struct parsed_tagarg *arg)
#ifdef USE_MENU
/* link menu */
@@ -21001,7 +21238,7 @@ index b421943..43e181c 100644
{
LinkList *l = link_menu(Currentbuf);
ParsedURL p_url;
-@@ -4329,26 +4457,25 @@ anchorMn(Anchor *(*menu_func) (Buffer *), int go)
+@@ -4329,26 +4476,25 @@ anchorMn(Anchor *(*menu_func) (Buffer *), int go)
}
/* accesskey */
@@ -21032,7 +21269,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
-@@ -4375,14 +4502,14 @@ DEFUN(cooLst, COOKIE, "View cookie list")
+@@ -4375,14 +4521,14 @@ DEFUN(cooLst, COOKIE, "View cookie list")
#ifdef USE_HISTORY
/* History page */
@@ -21049,7 +21286,7 @@ index b421943..43e181c 100644
{
CurrentKeyData = NULL; /* not allowed in w3m-control: */
do_download = TRUE;
-@@ -4391,7 +4518,7 @@ DEFUN(svA, SAVE_LINK, "Save link to file")
+@@ -4391,7 +4537,7 @@ DEFUN(svA, SAVE_LINK, "Save link to file")
}
/* download IMG link */
@@ -21058,7 +21295,7 @@ index b421943..43e181c 100644
{
CurrentKeyData = NULL; /* not allowed in w3m-control: */
do_download = TRUE;
-@@ -4400,7 +4527,7 @@ DEFUN(svI, SAVE_IMAGE, "Save image to file")
+@@ -4400,7 +4546,7 @@ DEFUN(svI, SAVE_IMAGE, "Save image to file")
}
/* save buffer */
@@ -21067,7 +21304,7 @@ index b421943..43e181c 100644
{
char *qfile = NULL, *file;
FILE *f;
-@@ -4449,7 +4576,7 @@ DEFUN(svBuf, PRINT SAVE_SCREEN, "Save rendered document to file")
+@@ -4449,7 +4595,7 @@ DEFUN(svBuf, PRINT SAVE_SCREEN, "Save rendered document to file")
}
/* save source */
@@ -21076,7 +21313,7 @@ index b421943..43e181c 100644
{
char *file;
-@@ -4510,8 +4637,7 @@ _peekURL(int only_img)
+@@ -4510,8 +4656,7 @@ _peekURL(int only_img)
s = parsedURL2Str(&pu);
}
if (DecodeURL)
@@ -21086,7 +21323,7 @@ index b421943..43e181c 100644
#ifdef USE_M17N
s = checkType(s, &pp, NULL);
p = NewAtom_N(Lineprop, s->length);
-@@ -4529,13 +4655,13 @@ _peekURL(int only_img)
+@@ -4529,13 +4674,13 @@ _peekURL(int only_img)
}
/* peek URL */
@@ -21102,7 +21339,7 @@ index b421943..43e181c 100644
{
_peekURL(1);
}
-@@ -4549,7 +4675,7 @@ currentURL(void)
+@@ -4549,7 +4694,7 @@ currentURL(void)
return parsedURL2Str(&Currentbuf->currentURL);
}
@@ -21111,7 +21348,7 @@ index b421943..43e181c 100644
{
static Str s = NULL;
#ifdef USE_M17N
-@@ -4570,7 +4696,7 @@ DEFUN(curURL, PEEK, "Peek current URL")
+@@ -4570,7 +4715,7 @@ DEFUN(curURL, PEEK, "Peek current URL")
offset = 0;
s = currentURL();
if (DecodeURL)
@@ -21120,7 +21357,7 @@ index b421943..43e181c 100644
#ifdef USE_M17N
s = checkType(s, &pp, NULL);
p = NewAtom_N(Lineprop, s->length);
-@@ -4588,7 +4714,7 @@ DEFUN(curURL, PEEK, "Peek current URL")
+@@ -4588,7 +4733,7 @@ DEFUN(curURL, PEEK, "Peek current URL")
}
/* view HTML source */
@@ -21129,7 +21366,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
-@@ -4679,7 +4805,7 @@ DEFUN(vwSrc, SOURCE VIEW, "View HTML source")
+@@ -4679,7 +4824,7 @@ DEFUN(vwSrc, SOURCE VIEW, "View HTML source")
}
/* reload */
@@ -21138,7 +21375,7 @@ index b421943..43e181c 100644
{
Buffer *buf, *fbuf = NULL, sbuf;
#ifdef USE_M17N
-@@ -4804,7 +4930,7 @@ DEFUN(reload, RELOAD, "Reload buffer")
+@@ -4804,7 +4949,7 @@ DEFUN(reload, RELOAD, "Reload buffer")
}
/* reshape */
@@ -21147,7 +21384,7 @@ index b421943..43e181c 100644
{
Currentbuf->need_reshape = TRUE;
reshapeBuffer(Currentbuf);
-@@ -4846,7 +4972,7 @@ change_charset(struct parsed_tagarg *arg)
+@@ -4846,7 +4991,7 @@ change_charset(struct parsed_tagarg *arg)
_docCSet(charset);
}
@@ -21156,7 +21393,7 @@ index b421943..43e181c 100644
{
char *cs;
wc_ces charset;
-@@ -4864,7 +4990,7 @@ DEFUN(docCSet, CHARSET, "Change the current document charset")
+@@ -4864,7 +5009,7 @@ DEFUN(docCSet, CHARSET, "Change the current document charset")
_docCSet(charset);
}
@@ -21165,7 +21402,7 @@ index b421943..43e181c 100644
{
char *cs;
wc_ces charset;
-@@ -4915,13 +5041,13 @@ chkURLBuffer(Buffer *buf)
+@@ -4915,13 +5060,13 @@ chkURLBuffer(Buffer *buf)
buf->check_url |= CHK_URL;
}
@@ -21181,7 +21418,7 @@ index b421943..43e181c 100644
{
char *p;
int spos, epos;
-@@ -4948,15 +5074,15 @@ chkNMIDBuffer(Buffer *buf)
+@@ -4948,15 +5093,15 @@ chkNMIDBuffer(Buffer *buf)
buf->check_url |= CHK_NMID;
}
@@ -21200,7 +21437,7 @@ index b421943..43e181c 100644
{
Buffer *buf;
-@@ -5010,6 +5136,24 @@ invoke_browser(char *url)
+@@ -5010,6 +5155,24 @@ invoke_browser(char *url)
case 3:
browser = ExtBrowser3;
break;
@@ -21225,7 +21462,7 @@ index b421943..43e181c 100644
}
if (browser == NULL || *browser == '\0') {
browser = inputStr("Browse command: ", NULL);
-@@ -5038,7 +5182,7 @@ invoke_browser(char *url)
+@@ -5038,7 +5201,7 @@ invoke_browser(char *url)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -21234,7 +21471,7 @@ index b421943..43e181c 100644
{
if (Currentbuf->bufferprop & BP_INTERNAL) {
/* FIXME: gettextize? */
-@@ -5055,7 +5199,7 @@ DEFUN(extbrz, EXTERN, "Execute external browser")
+@@ -5055,7 +5218,7 @@ DEFUN(extbrz, EXTERN, "Execute external browser")
invoke_browser(parsedURL2Str(&Currentbuf->currentURL)->ptr);
}
@@ -21243,7 +21480,7 @@ index b421943..43e181c 100644
{
Anchor *a;
ParsedURL pu;
-@@ -5070,7 +5214,7 @@ DEFUN(linkbrz, EXTERN_LINK, "View current link using external browser")
+@@ -5070,7 +5233,7 @@ DEFUN(linkbrz, EXTERN_LINK, "View current link using external browser")
}
/* show current line number and number of lines in the entire document */
@@ -21252,7 +21489,7 @@ index b421943..43e181c 100644
{
Line *l = Currentbuf->currentLine;
Str tmp;
-@@ -5362,7 +5506,7 @@ process_mouse(int btn, int x, int y)
+@@ -5362,7 +5525,7 @@ process_mouse(int btn, int x, int y)
}
}
@@ -21261,7 +21498,7 @@ index b421943..43e181c 100644
{
if (use_mouse) {
use_mouse = FALSE;
-@@ -5398,6 +5542,60 @@ DEFUN(mouse, MOUSE, "mouse operation")
+@@ -5398,6 +5561,60 @@ DEFUN(mouse, MOUSE, "mouse operation")
process_mouse(btn, x, y);
}
@@ -21322,7 +21559,7 @@ index b421943..43e181c 100644
#ifdef USE_GPM
int
gpm_process_mouse(Gpm_Event * event, void *data)
-@@ -5451,7 +5649,7 @@ sysm_process_mouse(int x, int y, int nbs, int obs)
+@@ -5451,7 +5668,7 @@ sysm_process_mouse(int x, int y, int nbs, int obs)
}
#endif /* USE_SYSMOUSE */
@@ -21331,7 +21568,7 @@ index b421943..43e181c 100644
{
if (!mouse_action.in_action)
return;
-@@ -5473,7 +5671,7 @@ DEFUN(movMs, MOVE_MOUSE, "Move cursor to mouse cursor (for mouse action)")
+@@ -5473,7 +5690,7 @@ DEFUN(movMs, MOVE_MOUSE, "Move cursor to mouse cursor (for mouse action)")
#define FRAME_WIDTH 1
#endif
@@ -21340,7 +21577,7 @@ index b421943..43e181c 100644
{
if (!mouse_action.in_action)
return;
-@@ -5490,7 +5688,7 @@ DEFUN(menuMs, MENU_MOUSE, "Popup menu at mouse cursor (for mouse action)")
+@@ -5490,7 +5707,7 @@ DEFUN(menuMs, MENU_MOUSE, "Popup menu at mouse cursor (for mouse action)")
}
#endif
@@ -21349,7 +21586,7 @@ index b421943..43e181c 100644
{
TabBuffer *tab;
-@@ -5503,8 +5701,7 @@ DEFUN(tabMs, TAB_MOUSE, "Move to tab on mouse cursor (for mouse action)")
+@@ -5503,8 +5720,7 @@ DEFUN(tabMs, TAB_MOUSE, "Move to tab on mouse cursor (for mouse action)")
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -21359,7 +21596,7 @@ index b421943..43e181c 100644
{
TabBuffer *tab;
-@@ -5518,12 +5715,12 @@ DEFUN(closeTMs, CLOSE_TAB_MOUSE,
+@@ -5518,12 +5734,12 @@ DEFUN(closeTMs, CLOSE_TAB_MOUSE,
}
#endif /* USE_MOUSE */
@@ -21374,7 +21611,7 @@ index b421943..43e181c 100644
{
if (WrapSearch) {
WrapSearch = FALSE;
-@@ -5604,7 +5801,7 @@ execdict(char *word)
+@@ -5604,7 +5820,7 @@ execdict(char *word)
disp_message("Execution failed", TRUE);
return;
}
@@ -21383,7 +21620,7 @@ index b421943..43e181c 100644
buf->filename = w;
buf->buffername = Sprintf("%s %s", DICTBUFFERNAME, word)->ptr;
if (buf->type == NULL)
-@@ -5671,7 +5868,7 @@ set_buffer_environ(Buffer *buf)
+@@ -5671,7 +5887,7 @@ set_buffer_environ(Buffer *buf)
set_environ("W3M_CURRENT_FORM", form2str((FormItemList *)a->url));
else
set_environ("W3M_CURRENT_FORM", "");
@@ -21392,7 +21629,7 @@ index b421943..43e181c 100644
l->real_linenumber)->ptr);
set_environ("W3M_CURRENT_COLUMN", Sprintf("%d",
buf->currentColumn +
-@@ -5747,8 +5944,14 @@ deleteFiles()
+@@ -5747,8 +5963,14 @@ deleteFiles()
Firstbuf = buf;
}
}
@@ -21408,7 +21645,7 @@ index b421943..43e181c 100644
}
void
-@@ -5768,11 +5971,18 @@ w3m_exit(int i)
+@@ -5768,11 +5990,18 @@ w3m_exit(int i)
#endif
#ifdef __MINGW32_VERSION
WSACleanup();
@@ -21428,7 +21665,7 @@ index b421943..43e181c 100644
{
char *data, *p;
int cmd;
-@@ -5900,7 +6110,7 @@ setAlarmEvent(AlarmEvent * event, int sec, short status, int cmd, void *data)
+@@ -5900,7 +6129,7 @@ setAlarmEvent(AlarmEvent * event, int sec, short status, int cmd, void *data)
}
#endif
@@ -21437,7 +21674,7 @@ index b421943..43e181c 100644
{
char *resource = searchKeyData();
-@@ -5969,8 +6179,7 @@ DEFUN(reinit, REINIT, "Reload configuration files")
+@@ -5969,8 +6198,7 @@ DEFUN(reinit, REINIT, "Reload configuration files")
ptr, FALSE);
}
@@ -21447,7 +21684,7 @@ index b421943..43e181c 100644
{
char *data;
-@@ -6031,7 +6240,7 @@ _newT(void)
+@@ -6031,7 +6259,7 @@ _newT(void)
nTab++;
}
@@ -21456,7 +21693,7 @@ index b421943..43e181c 100644
{
_newT();
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
-@@ -6142,7 +6351,7 @@ deleteTab(TabBuffer * tab)
+@@ -6142,7 +6370,7 @@ deleteTab(TabBuffer * tab)
return FirstTab;
}
@@ -21465,7 +21702,7 @@ index b421943..43e181c 100644
{
TabBuffer *tab;
-@@ -6157,7 +6366,7 @@ DEFUN(closeT, CLOSE_TAB, "Close current tab")
+@@ -6157,7 +6385,7 @@ DEFUN(closeT, CLOSE_TAB, "Close current tab")
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
}
@@ -21474,7 +21711,7 @@ index b421943..43e181c 100644
{
int i;
-@@ -6172,7 +6381,7 @@ DEFUN(nextT, NEXT_TAB, "Move to next tab")
+@@ -6172,7 +6400,7 @@ DEFUN(nextT, NEXT_TAB, "Move to next tab")
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
}
@@ -21483,7 +21720,7 @@ index b421943..43e181c 100644
{
int i;
-@@ -6236,7 +6445,7 @@ followTab(TabBuffer * tab)
+@@ -6236,7 +6464,7 @@ followTab(TabBuffer * tab)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -21492,7 +21729,7 @@ index b421943..43e181c 100644
{
followTab(prec_num ? numTab(PREC_NUM) : NULL);
}
-@@ -6277,13 +6486,13 @@ tabURL0(TabBuffer * tab, char *prompt, int relative)
+@@ -6277,13 +6505,13 @@ tabURL0(TabBuffer * tab, char *prompt, int relative)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -21508,7 +21745,7 @@ index b421943..43e181c 100644
{
tabURL0(prec_num ? numTab(PREC_NUM) : NULL,
"Goto relative URL on new tab: ", TRUE);
-@@ -6328,7 +6537,7 @@ moveTab(TabBuffer * t, TabBuffer * t2, int right)
+@@ -6328,7 +6556,7 @@ moveTab(TabBuffer * t, TabBuffer * t2, int right)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -21517,7 +21754,7 @@ index b421943..43e181c 100644
{
TabBuffer *tab;
int i;
-@@ -6338,7 +6547,7 @@ DEFUN(tabR, TAB_RIGHT, "Move current tab right")
+@@ -6338,7 +6566,7 @@ DEFUN(tabR, TAB_RIGHT, "Move current tab right")
moveTab(CurrentTab, tab ? tab : LastTab, TRUE);
}
@@ -21526,7 +21763,7 @@ index b421943..43e181c 100644
{
TabBuffer *tab;
int i;
-@@ -6547,7 +6756,7 @@ stopDownload(void)
+@@ -6547,7 +6775,7 @@ stopDownload(void)
}
/* download panel */
@@ -22093,7 +22330,7 @@ index 2f57810..a60a09d 100644
# bugs in the untranslated strings:
diff --git a/po/de.po b/po/de.po
new file mode 100644
-index 0000000..b4dcd36
+index 0000000..e271ae7
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,936 @@
@@ -22691,8 +22928,8 @@ index 0000000..b4dcd36
+msgstr "Datei mit PEM-kodierten Zertifikaten von CAs"
+
+#: rc.c:205
-+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
-+msgstr "Liste unzulässiger SSL-Verfahren (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
++msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
++msgstr "Liste unzulässiger SSL-Verfahren (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
@@ -23034,7 +23271,7 @@ index 0000000..b4dcd36
+msgid "en;q=1.0"
+msgstr "de;q=1.0, en;q=0.5"
diff --git a/po/ja.po b/po/ja.po
-index d67c695..95a5341 100644
+index d67c695..5ba7bba 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1,6 +1,6 @@
@@ -23767,8 +24004,8 @@ index d67c695..95a5341 100644
-msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
-msgstr "使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t:TLSv1)"
+#: rc.c:205
-+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
-+msgstr "使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
++msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
++msgstr "使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
-#: rc.c:198
+#: rc.c:208
@@ -24174,7 +24411,7 @@ index d67c695..95a5341 100644
msgid "en;q=1.0"
msgstr "ja;q=1.0, en;q=0.5"
diff --git a/po/w3m.pot b/po/w3m.pot
-index e164b1e..bf38ef8 100644
+index e164b1e..b09b889 100644
--- a/po/w3m.pot
+++ b/po/w3m.pot
@@ -1,6 +1,6 @@
@@ -24902,7 +25139,7 @@ index e164b1e..bf38ef8 100644
-#: rc.c:195
-msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
+#: rc.c:205
-+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
++msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
msgstr ""
-#: rc.c:198
@@ -25310,7 +25547,7 @@ index e164b1e..bf38ef8 100644
msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
-index 0000000..cf25e22
+index 0000000..d1486ed
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,916 @@
@@ -25903,8 +26140,8 @@ index 0000000..cf25e22
+msgstr "包含 PEM 编码 CA 证书的文件"
+
+#: rc.c:205
-+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
-+msgstr "被禁止的 SSL 方式列表 (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
++msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
++msgstr "被禁止的 SSL 方式列表 (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
@@ -26232,7 +26469,7 @@ index 0000000..cf25e22
+msgstr "zh-CN;q=1.0, zh-Hans;q=0.9, zh;q=0.8, en;q=0.6"
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644
-index 0000000..44f7a14
+index 0000000..d4f98db
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,916 @@
@@ -26825,8 +27062,8 @@ index 0000000..44f7a14
+msgstr "包含 PEM 編碼 CA 證書的檔案"
+
+#: rc.c:205
-+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
-+msgstr "被禁止的 SSL 方式列表 (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
++msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
++msgstr "被禁止的 SSL 方式列表 (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
@@ -27153,7 +27390,7 @@ index 0000000..44f7a14
+msgid "en;q=1.0"
+msgstr "zh-TW;q=1.0, zh-Hants;q=0.9, zh;q=0.8, en;q=0.6"
diff --git a/proto.h b/proto.h
-index f8a7345..ed8f890 100644
+index f8a7345..d513527 100644
--- a/proto.h
+++ b/proto.h
@@ -11,6 +11,8 @@ extern void pushEvent(int cmd, void *data);
@@ -27173,7 +27410,15 @@ index f8a7345..ed8f890 100644
extern void onA(void);
extern void nextA(void);
-@@ -162,6 +165,24 @@ extern Str searchURIMethods(ParsedURL *pu);
+@@ -78,6 +81,7 @@ extern void prevBf(void);
+ extern void backBf(void);
+ extern void deletePrevBuf(void);
+ extern void goURL(void);
++extern void goHome(void);
+ extern void gorURL(void);
+ extern void ldBmark(void);
+ extern void adBmark(void);
+@@ -162,6 +166,24 @@ extern Str searchURIMethods(ParsedURL *pu);
extern void chkExternalURIBuffer(Buffer *buf);
#endif
extern ParsedURL *schemeToProxy(int scheme);
@@ -27198,7 +27443,7 @@ index f8a7345..ed8f890 100644
extern void examineFile(char *path, URLFile *uf);
extern char *acceptableEncoding();
extern int dir_exist(char *path);
-@@ -180,7 +201,6 @@ extern void push_symbol(Str str, char symbol, int width, int n);
+@@ -180,7 +202,6 @@ extern void push_symbol(Str str, char symbol, int width, int n);
#ifdef USE_UNICODE
extern void update_utf8_symbol(void);
#endif
@@ -27206,7 +27451,7 @@ index f8a7345..ed8f890 100644
extern Buffer *loadGeneralFile(char *path, ParsedURL *current, char *referer,
int flag, FormList *request);
extern int is_boundary(unsigned char *, unsigned char *);
-@@ -207,6 +227,8 @@ extern int getImageSize(ImageCache * cache);
+@@ -207,6 +228,8 @@ extern int getImageSize(ImageCache * cache);
extern Str process_img(struct parsed_tag *tag, int width);
extern Str process_anchor(struct parsed_tag *tag, char *tagbuf);
extern Str process_input(struct parsed_tag *tag);
@@ -27215,7 +27460,7 @@ index f8a7345..ed8f890 100644
extern Str process_select(struct parsed_tag *tag);
extern Str process_n_select(void);
extern void feed_select(char *str);
-@@ -249,8 +271,7 @@ extern Buffer *openPagerBuffer(InputStream stream, Buffer *buf);
+@@ -249,8 +272,7 @@ extern Buffer *openPagerBuffer(InputStream stream, Buffer *buf);
extern Buffer *openGeneralPagerBuffer(InputStream stream);
extern Line *getNextPage(Buffer *buf, int plen);
extern int save2tmp(URLFile uf, char *tmpf);
@@ -27225,7 +27470,7 @@ index f8a7345..ed8f890 100644
extern int _doFileCopy(char *tmpf, char *defstr, int download);
#define doFileCopy(tmpf, defstr) _doFileCopy(tmpf, defstr, FALSE);
extern int doFileMove(char *tmpf, char *defstr);
-@@ -372,6 +393,7 @@ extern void align(TextLine *lbuf, int width, int mode);
+@@ -372,6 +394,7 @@ extern void align(TextLine *lbuf, int width, int mode);
extern void print_item(struct table *t, int row, int col, int width, Str buf);
extern void print_sep(struct table *t, int row, int type, int maxcol, Str buf);
extern void do_refill(struct table *tbl, int row, int col, int maxlimit);
@@ -27233,7 +27478,7 @@ index f8a7345..ed8f890 100644
extern void renderTable(struct table *t, int max_width,
struct html_feed_environ *h_env);
extern struct table *begin_table(int border, int spacing, int padding,
-@@ -507,7 +529,7 @@ extern ParsedURL *baseURL(Buffer *buf);
+@@ -507,7 +530,7 @@ extern ParsedURL *baseURL(Buffer *buf);
extern int openSocket(char *hostname, char *remoteport_name,
unsigned short remoteport_num);
extern void parseURL(char *url, ParsedURL *p_url, ParsedURL *current);
@@ -27242,7 +27487,7 @@ index f8a7345..ed8f890 100644
extern void parseURL2(char *url, ParsedURL *pu, ParsedURL *current);
extern Str parsedURL2Str(ParsedURL *pu);
extern int getURLScheme(char **url);
-@@ -586,9 +608,12 @@ extern char *getAnchorText(Buffer *buf, AnchorList *al, Anchor *a);
+@@ -586,9 +609,12 @@ extern char *getAnchorText(Buffer *buf, AnchorList *al, Anchor *a);
extern Buffer *link_list_panel(Buffer *buf);
extern Str decodeB(char **ww);
@@ -27255,7 +27500,7 @@ index f8a7345..ed8f890 100644
#ifdef USE_M17N
extern Str decodeWord(char **ow, wc_ces * charset);
extern Str decodeMIME(Str orgstr, wc_ces * charset);
-@@ -611,6 +636,7 @@ extern char *confFile(char *base);
+@@ -611,6 +637,7 @@ extern char *confFile(char *base);
extern char *auxbinFile(char *base);
extern char *libFile(char *base);
extern char *helpFile(char *base);
@@ -27263,7 +27508,7 @@ index f8a7345..ed8f890 100644
extern Str localCookie(void);
extern Str loadLocalDir(char *dirname);
extern void set_environ(char *var, char *value);
-@@ -683,6 +709,7 @@ extern void reMark(void);
+@@ -683,6 +710,7 @@ extern void reMark(void);
#ifdef USE_MOUSE
extern void mouse(void);
@@ -27271,7 +27516,7 @@ index f8a7345..ed8f890 100644
extern void mouse_init(void);
extern void mouse_end(void);
extern void mouse_active(void);
-@@ -698,6 +725,7 @@ extern void tabMs(void);
+@@ -698,6 +726,7 @@ extern void tabMs(void);
extern void closeTMs(void);
#else /* not USE_MOUSE */
#define mouse nulcmd
@@ -27279,7 +27524,7 @@ index f8a7345..ed8f890 100644
#define msToggle nulcmd
#define movMs nulcmd
#define menuMs nulcmd
-@@ -723,6 +751,8 @@ extern int getKey(char *s);
+@@ -723,6 +752,8 @@ extern int getKey(char *s);
extern char *getKeyData(int key);
extern char *getWord(char **str);
extern char *getQWord(char **str);
@@ -27288,14 +27533,14 @@ index f8a7345..ed8f890 100644
#ifdef USE_MOUSE
extern void initMouseAction(void);
#endif
-@@ -786,5 +816,3 @@ extern void dispVer(void);
+@@ -786,5 +817,3 @@ extern void dispVer(void);
void srand48(long);
long lrand48(void);
#endif
-
-#include "indep.h"
diff --git a/rc.c b/rc.c
-index 8441a39..3fd84ef 100644
+index 8441a39..a44c5c8 100644
--- a/rc.c
+++ b/rc.c
@@ -9,7 +9,9 @@
@@ -27344,7 +27589,7 @@ index 8441a39..3fd84ef 100644
#define CMT_SSL_CA_FILE N_("File consisting of PEM encoded certificates of CAs")
#endif /* USE_SSL_VERIFY */
-#define CMT_SSL_FORBID_METHOD N_("List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)")
-+#define CMT_SSL_FORBID_METHOD N_("List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)")
++#define CMT_SSL_FORBID_METHOD N_("List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1, 6: TLSv1.2, 7: TLSv1.3)")
#endif /* USE_SSL */
#ifdef USE_COOKIE
#define CMT_USECOOKIE N_("Enable cookie processing")
@@ -27491,7 +27736,7 @@ index 8441a39..3fd84ef 100644
sync_with_option();
backBf();
}
-@@ -1556,3 +1594,217 @@ helpFile(char *base)
+@@ -1556,3 +1594,229 @@ helpFile(char *base)
return expandPath(Strnew_m_charp(w3m_help_dir(), "/", base, NULL)->ptr);
}
#endif
@@ -27503,6 +27748,7 @@ index 8441a39..3fd84ef 100644
+ * url_charset <charset>
+ * no_referer_from on|off
+ * no_referer_to on|off
++ * user_agent "<string>"
+ *
+ * The last match wins.
+ */
@@ -27515,6 +27761,7 @@ index 8441a39..3fd84ef 100644
+ unsigned char mask[(SCONF_N_FIELD + 7) >> 3];
+
+ char *substitute_url;
++ char *user_agent;
+#ifdef USE_M17N
+ wc_ces url_charset;
+#endif
@@ -27541,6 +27788,7 @@ index 8441a39..3fd84ef 100644
+ memset(ent->mask, 0, sizeof(ent->mask));
+
+ ent->substitute_url = NULL;
++ ent->user_agent = NULL;
+#ifdef USE_M17N
+ ent->url_charset = 0;
+#endif
@@ -27619,6 +27867,10 @@ index 8441a39..3fd84ef 100644
+ ent->substitute_url = getQWord(&p);
+ SCONF_SET(ent, SCONF_SUBSTITUTE_URL);
+ }
++ if (strcmp(s, "user_agent") == 0) {
++ ent->user_agent = getQWord(&p);
++ SCONF_SET(ent, SCONF_USER_AGENT);
++ }
+#ifdef USE_M17N
+ else if (strcmp(s, "url_charset") == 0) {
+ char *charset = getWord(&p);
@@ -27698,6 +27950,11 @@ index 8441a39..3fd84ef 100644
+ return tmp->ptr;
+ }
+ return NULL;
++ case SCONF_USER_AGENT:
++ if (ent->user_agent && *ent->user_agent) {
++ return ent->user_agent;
++ }
++ return NULL;
+#ifdef USE_M17N
+ case SCONF_URL_CHARSET:
+ return &ent->url_charset;
@@ -28010,7 +28267,7 @@ index 051c888..4ef476e 100644
1;
diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in
-index b2fca8f..503dddc 100644
+index b2fca8f..348d5df 100644
--- a/scripts/w3mhelp.cgi.in
+++ b/scripts/w3mhelp.cgi.in
@@ -48,7 +48,7 @@ if (defined($ENV{'QUERY_STRING'})) {
@@ -28078,9 +28335,11 @@ index b2fca8f..503dddc 100644
pipeBuf"));
-&show_keymap("Buffer operation",
+- split(" ", "backBf nextBf prevBf selMn selBuf vwSrc svSrc svBuf
+- editBf editScr reload reshape rdrwSc dispI stopI"));
+&show_keymap('Buffer Operations',
- split(" ", "backBf nextBf prevBf selMn selBuf vwSrc svSrc svBuf
- editBf editScr reload reshape rdrwSc dispI stopI"));
++ split(" ", "backBf nextBf prevBf goHome selMn selBuf vwSrc svSrc
++ svBuf editBf editScr reload reshape rdrwSc dispI stopI"));
-&show_keymap("Tab operation",
+&show_keymap('Tab Operations',
@@ -29103,7 +29362,7 @@ index 7a3c987..a636ac0 100644
#define CYGWIN_OFF {fputs("\033[?1000l",ttyf); flush_tty();}
diff --git a/url.c b/url.c
-index ed6062e..1c17e18 100644
+index ed6062e..a9e4108 100644
--- a/url.c
+++ b/url.c
@@ -121,6 +121,7 @@ static struct table2 DefaultGuess[] = {
@@ -29135,14 +29394,24 @@ index ed6062e..1c17e18 100644
option = SSL_OP_ALL;
if (ssl_forbid_method) {
if (strchr(ssl_forbid_method, '2'))
-@@ -336,8 +342,20 @@ openSSLHandle(int sock, char *hostname, char **p_cert)
+@@ -336,8 +342,30 @@ openSSLHandle(int sock, char *hostname, char **p_cert)
option |= SSL_OP_NO_TLSv1;
if (strchr(ssl_forbid_method, 'T'))
option |= SSL_OP_NO_TLSv1;
+ if (strchr(ssl_forbid_method, '4'))
+ option |= SSL_OP_NO_TLSv1;
++#ifdef SSL_OP_NO_TLSv1_1
+ if (strchr(ssl_forbid_method, '5'))
+ option |= SSL_OP_NO_TLSv1_1;
++#endif
++#ifdef SSL_OP_NO_TLSv1_2
++ if (strchr(ssl_forbid_method, '6'))
++ option |= SSL_OP_NO_TLSv1_2;
++#endif
++#ifdef SSL_OP_NO_TLSv1_3
++ if (strchr(ssl_forbid_method, '7'))
++ option |= SSL_OP_NO_TLSv1_3;
++#endif
}
+#ifdef SSL_OP_NO_COMPRESSION
+ option |= SSL_OP_NO_COMPRESSION;
@@ -29156,7 +29425,7 @@ index ed6062e..1c17e18 100644
#ifdef USE_SSL_VERIFY
/* derived from openssl-0.9.5/apps/s_{client,cb}.c */
#if 1 /* use SSL_get_verify_result() to verify cert */
-@@ -444,6 +462,8 @@ baseURL(Buffer *buf)
+@@ -444,6 +472,8 @@ baseURL(Buffer *buf)
/* <BASE> tag is defined in the document */
return buf->baseURL;
}
@@ -29165,7 +29434,7 @@ index ed6062e..1c17e18 100644
else
return &buf->currentURL;
}
-@@ -638,16 +658,21 @@ openSocket(char *const hostname,
+@@ -638,16 +668,21 @@ openSocket(char *const hostname,
#define COPYPATH_SPC_ALLOW 0
#define COPYPATH_SPC_IGNORE 1
#define COPYPATH_SPC_REPLACE 2
@@ -29191,7 +29460,7 @@ index ed6062e..1c17e18 100644
break;
case COPYPATH_SPC_IGNORE:
/* do nothing */
-@@ -658,7 +683,7 @@ copyPath(char *orgpath, int length, int option)
+@@ -658,7 +693,7 @@ copyPath(char *orgpath, int length, int option)
}
}
else
@@ -29200,7 +29469,7 @@ index ed6062e..1c17e18 100644
orgpath++;
length--;
}
-@@ -668,22 +693,14 @@ copyPath(char *orgpath, int length, int option)
+@@ -668,22 +703,14 @@ copyPath(char *orgpath, int length, int option)
void
parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
{
@@ -29225,7 +29494,7 @@ index ed6062e..1c17e18 100644
/* RFC1808: Relative Uniform Resource Locators
* 4. Resolving Relative URLs
-@@ -694,7 +711,7 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
+@@ -694,7 +721,7 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
goto do_label;
}
#if defined( __EMX__ ) || defined( __CYGWIN__ )
@@ -29234,7 +29503,7 @@ index ed6062e..1c17e18 100644
p_url->scheme = SCM_LOCAL;
p += 17 - 1;
url += 17 - 1;
-@@ -802,19 +819,20 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
+@@ -802,19 +829,20 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
/* scheme://user:pass@host or
* scheme://host:port
*/
@@ -29259,7 +29528,7 @@ index ed6062e..1c17e18 100644
tmp = Strnew_charp_n(q, p - q);
p_url->port = atoi(tmp->ptr);
/* *p is one of ['\0', '/', '?', '#'] */
-@@ -822,15 +840,19 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
+@@ -822,15 +850,19 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
case '@':
/* scheme://user@... */
p_url->user = copyPath(q, p - q, COPYPATH_SPC_IGNORE);
@@ -29282,7 +29551,7 @@ index ed6062e..1c17e18 100644
break;
}
analyze_file:
-@@ -956,12 +978,16 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
+@@ -956,12 +988,16 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
p_url->label = NULL;
}
@@ -29301,7 +29570,7 @@ index ed6062e..1c17e18 100644
p->scheme = q->scheme;
p->port = q->port;
p->is_nocache = q->is_nocache;
-@@ -1279,10 +1305,24 @@ getURLScheme(char **url)
+@@ -1279,17 +1315,36 @@ getURLScheme(char **url)
return scheme;
}
@@ -29323,10 +29592,28 @@ index ed6062e..1c17e18 100644
Str s = Strnew();
+ const int *no_referer_ptr;
+ int no_referer;
++ const char* url_user_agent = query_SCONF_USER_AGENT(target);
+
+- Strcat_charp(s, "User-Agent: ");
+- if (UserAgent == NULL || *UserAgent == '\0')
+- Strcat_charp(s, w3m_version);
+- else
+- Strcat_charp(s, UserAgent);
+- Strcat_charp(s, "\r\n");
++ if (!override_user_agent) {
++ Strcat_charp(s, "User-Agent: ");
++ if (url_user_agent)
++ Strcat_charp(s, url_user_agent);
++ else if (UserAgent == NULL || *UserAgent == '\0')
++ Strcat_charp(s, w3m_version);
++ else
++ Strcat_charp(s, UserAgent);
++ Strcat_charp(s, "\r\n");
++ }
- Strcat_charp(s, "User-Agent: ");
- if (UserAgent == NULL || *UserAgent == '\0')
-@@ -1306,7 +1346,12 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
+ Strcat_m_charp(s, "Accept: ", AcceptMedia, "\r\n", NULL);
+ Strcat_m_charp(s, "Accept-Encoding: ", AcceptEncoding, "\r\n", NULL);
+@@ -1306,7 +1361,12 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
Strcat_charp(s, "Pragma: no-cache\r\n");
Strcat_charp(s, "Cache-control: no-cache\r\n");
}
@@ -29340,7 +29627,7 @@ index ed6062e..1c17e18 100644
#ifdef USE_SSL
if (current && current->scheme == SCM_HTTPS && target->scheme != SCM_HTTPS) {
/* Don't send Referer: if https:// -> http:// */
-@@ -1314,6 +1359,7 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
+@@ -1314,6 +1374,7 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
else
#endif
if (referer == NULL && current && current->scheme != SCM_LOCAL &&
@@ -29348,7 +29635,7 @@ index ed6062e..1c17e18 100644
(current->scheme != SCM_FTP ||
(current->user == NULL && current->pass == NULL))) {
char *p = current->label;
-@@ -1384,7 +1430,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
+@@ -1384,7 +1445,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
{
Str tmp;
TextListItem *i;
@@ -29356,7 +29643,7 @@ index ed6062e..1c17e18 100644
#ifdef USE_COOKIE
Str cookie;
#endif /* USE_COOKIE */
-@@ -1400,7 +1445,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
+@@ -1400,7 +1460,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
for (i = extra->first; i != NULL; i = i->next) {
if (strncasecmp(i->ptr, "Authorization:",
sizeof("Authorization:") - 1) == 0) {
@@ -29364,7 +29651,7 @@ index ed6062e..1c17e18 100644
#ifdef USE_SSL
if (hr->command == HR_COMMAND_CONNECT)
continue;
-@@ -1430,20 +1474,20 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
+@@ -1430,20 +1489,20 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
#endif /* USE_COOKIE */
if (hr->command == HR_COMMAND_POST) {
if (hr->request->enctype == FORM_ENCTYPE_MULTIPART) {
@@ -29389,7 +29676,7 @@ index ed6062e..1c17e18 100644
if (header_string)
Strcat(tmp, header_string);
Strcat_charp(tmp, "\r\n");
-@@ -1603,7 +1647,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1603,7 +1662,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
pu->host != NULL && !check_no_proxy(pu->host)) {
hr->flag |= HR_FLAG_PROXY;
sock = openSocket(FTP_proxy_parsed.host,
@@ -29398,7 +29685,7 @@ index ed6062e..1c17e18 100644
FTP_proxy_parsed.port);
if (sock < 0)
return uf;
-@@ -1645,15 +1689,15 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1645,15 +1704,15 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
}
else if (pu->scheme == SCM_HTTPS) {
sock = openSocket(HTTPS_proxy_parsed.host,
@@ -29418,7 +29705,7 @@ index ed6062e..1c17e18 100644
#ifdef USE_SSL
sslh = NULL;
}
-@@ -1685,8 +1729,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1685,8 +1744,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
}
}
else {
@@ -29428,7 +29715,7 @@ index ed6062e..1c17e18 100644
if (sock < 0) {
*status = HTST_MISSING;
return uf;
-@@ -1713,6 +1756,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1713,6 +1771,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
write(sock, tmp->ptr, tmp->length);
if(w3m_reqlog){
FILE *ff = fopen(w3m_reqlog, "a");
@@ -29437,7 +29724,7 @@ index ed6062e..1c17e18 100644
if (sslh)
fputs("HTTPS: request via SSL\n", ff);
else
-@@ -1735,6 +1780,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1735,6 +1795,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
write(sock, tmp->ptr, tmp->length);
if(w3m_reqlog){
FILE *ff = fopen(w3m_reqlog, "a");
@@ -29446,7 +29733,7 @@ index ed6062e..1c17e18 100644
fwrite(tmp->ptr, sizeof(char), tmp->length, ff);
fclose(ff);
}
-@@ -1750,7 +1797,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1750,7 +1812,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
pu->host != NULL && !check_no_proxy(pu->host)) {
hr->flag |= HR_FLAG_PROXY;
sock = openSocket(GOPHER_proxy_parsed.host,
@@ -29455,7 +29742,7 @@ index ed6062e..1c17e18 100644
GOPHER_proxy_parsed.port);
if (sock < 0)
return uf;
-@@ -1758,8 +1805,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1758,8 +1820,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
tmp = HTTPrequest(pu, current, hr, extra_header);
}
else {
@@ -29465,7 +29752,7 @@ index ed6062e..1c17e18 100644
if (sock < 0)
return uf;
if (pu->file == NULL)
-@@ -2049,7 +2095,7 @@ filename_extension(char *path, int is_url)
+@@ -2049,7 +2110,7 @@ filename_extension(char *path, int is_url)
break;
}
if (*last_dot == '.') {
@@ -29474,7 +29761,7 @@ index ed6062e..1c17e18 100644
if (is_url && !IS_ALNUM(last_dot[i]))
break;
}
-@@ -2234,3 +2280,66 @@ schemeToProxy(int scheme)
+@@ -2234,3 +2295,66 @@ schemeToProxy(int scheme)
}
return pu;
}