aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2018-01-25 09:43:42 +0000
committerTatsuya Kinoshita <tats@debian.org>2018-01-25 09:43:42 +0000
commit53f367af5c3fa33c949bc63bc31fa1b86577b5e3 (patch)
tree6c22606793bfbe8ba02459504bfed24ce2b4f8ee /debian
parentupdate debian/changelog (diff)
downloadw3m-53f367af5c3fa33c949bc63bc31fa1b86577b5e3.tar.gz
w3m-53f367af5c3fa33c949bc63bc31fa1b86577b5e3.zip
Update 020_debian.patch to v0.5.3+git20180125
- Fix stack overflow with malformed text [CVE-2018-6196] - Fix null deref with malformed text [CVE-2018-6197] - Fix /tmp file races only when ~/.w3m is unwritable [CVE-2018-6198] (closes: #888097) - Suppress error messages when ~/.w3m is unwritable (closes: #871425) - Extend ssl_forbid_method to disable TLSv1.1 (closes: #874218) - Typo fix in --help message (closes: #878106)
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/020_debian.patch1046
1 files changed, 788 insertions, 258 deletions
diff --git a/debian/patches/020_debian.patch b/debian/patches/020_debian.patch
index 9d17218..b67e317 100644
--- a/debian/patches/020_debian.patch
+++ b/debian/patches/020_debian.patch
@@ -1,5 +1,5 @@
Description: Git master branch of Debian's w3m
-Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git
+Origin: https://salsa.debian.org/debian/w3m/commits/master
diff --git a/Bonus/goodict.cgi b/Bonus/goodict.cgi
index 8f443c1..5fb6581 100755
@@ -60,10 +60,102 @@ index 8f443c1..5fb6581 100755
$input = "w3m-control: GOTO_LINK";
}
diff --git a/ChangeLog b/ChangeLog
-index 88358ef..5e77a18 100644
+index 88358ef..b14c60a 100644
--- a/ChangeLog
+++ b/ChangeLog
-@@ -1,3 +1,1526 @@
+@@ -1,3 +1,1618 @@
++2018-01-25 Tatsuya Kinoshita <tats@debian.org>
++
++ * ChangeLog, NEWS: Add CVE IDs.
++ cf. https://security-tracker.debian.org/tracker/source-package/w3m
++
++2018-01-21 Tatsuya Kinoshita <tats@debian.org>
++
++ * NEWS: Update NEWS.
++
++ * scripts/Makefile.in: Do not remove w3mdict.cgi when "make distclean".
++
++ * config.h.dist, config.h.in, configure, configure.ac, main.c, rc.c:
++ Make temporary directory safely when ~/.w3m is unwritable.
++ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888097
++ [CVE-2018-6198]
++
++ * rc.c: Suppress error messages when ~/.w3m is unwritable.
++ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871425
++
++2018-01-20 Tatsuya Kinoshita <tats@debian.org>
++
++ * config.guess, config.sub:
++ Update config.* with autotools-dev 20171216.1.
++
++ * table.c: Prevent negative indent value in feed_table_block_tag().
++ Bug-Debian: https://github.com/tats/w3m/issues/88 [CVE-2018-6196]
++
++2018-01-06 Tatsuya Kinoshita <tats@debian.org>
++
++ * doc-jp/README.SSL: Doc fix for ssl_forbid_method.
++
++ * po/de.po, po/ja.po, po/w3m.pot, po/zh_CN.po, po/zh_TW.po, rc.c:
++ * url.c: Fix multi-character character constant for ssl_forbid_method.
++
++2018-01-06 se <se@example.com>
++
++ * po/de.po, po/ja.po, po/w3m.pot, po/zh_CN.po, po/zh_TW.po, rc.c:
++ * url.c: Extend ssl_forbid_method to disable TLSv1.1.
++ Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874218#5
++
++2018-01-06 Tatsuya Kinoshita <tats@debian.org>
++
++ * w3mimg/fb/fb_w3mimg.c: Accept TERM=fbterm.
++ cf. https://bushowhige.blogspot.jp/2015/01/fbterm-w3m-img.html
++
++2017-12-27 Tatsuya Kinoshita <tats@debian.org>
++
++ * form.c: Prevent invalid columnPos() call in formUpdateBuffer().
++ Bug-Debian: https://github.com/tats/w3m/issues/89 [CVE-2018-6197]
++
++ * main.c: Typo fix in fusage().
++ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=878106
++
++ * doc-jp/README.tab, doc/README.tab, main.c: English fix.
++ cf. [emacs-w3m:12706], http://emacs-w3m.namazu.org/ml/msg12598.html
++
++2017-12-24 HIGUCHI Daisuke (VDR dai) <dai@debian.org>
++
++ * scripts/w3mman/w3mman.1.in, terms.c: Fix spelling error.
++
++2017-08-27 Kyle J. McKay <mackyle@gmail.com>
++
++ Correct <base ...> parsing and do not turn a form's GET into POST.
++ Bug-Debian: https://github.com/tats/w3m/pull/93
++
++ * form.c:
++ form.c: do not gratuitously turn GET into POST.
++ When encountering a <form ...> tag that contains these values:
++ method="get" enctype="multipart/form-data"
++ Do not transform the method into POST to accomodate enctype.
++ Instead behave in the compatible way that all other browsers
++ behave in this instance and ignore the enctype parameter
++ (treating it as the default application/x-www-form-urlencoded)
++ and perform a "GET" just as the method parameter requests.
++ This behavior produces far more compatible results than
++ gratuitously changing the "get" into a "post" which can
++ result in unexpected "405 Method Not Allowed" errors.
++ Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
++
++ * file.c:
++ file.c: compute correct base URL when not absolute.
++ When a server makes use of the PATH_INFO feature in a CGI,
++ the returned pages may often have a <base href="..." /> tag
++ specifying the URL of the CGI itself as the base.
++ However, to avoid hard-coding the scheme and host into such
++ a base href, the href value will often omit the scheme, host
++ and port.
++ Make sure that when parsing any such base href value that
++ any omitted components are taken from the current URL rather
++ than taken as being from a bare, absolute file:/// URL.
++ Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
++
+2017-01-02 Tatsuya Kinoshita <tats@debian.org>
+
+ * NEWS: Update NEWS.
@@ -1642,10 +1734,23 @@ index 7d692f9..453072d 100644
do \
(cd $$dir && $(MAKE) $(MAKE_ARGS) uninstall); \
diff --git a/NEWS b/NEWS
-index 66e309d..d8a99d3 100644
+index 66e309d..4ed621a 100644
--- a/NEWS
+++ b/NEWS
-@@ -1,3 +1,65 @@
+@@ -1,3 +1,78 @@
++Debian's w3m 0.5.3+git20180125
++
++* bug fixes
++ - fix stack overflow with malformed text [CVE-2018-6196]
++ - fix null deref with malformed text [CVE-2018-6197]
++ - fix /tmp file races only when ~/.w3m is unwritable [CVE-2018-6198]
++ - do not remove w3mdict.cgi when "make distclean"
++ - do not turn a form's GET into POST
++ - correct <base ...> parsing
++ - accept TERM=fbterm
++* new feature
++ - extend ssl_forbid_method to disable TLSv1.1
++
+Debian's w3m 0.5.3+git20170102
+
+* bug fixes
@@ -2220,7 +2325,7 @@ index 5afc26a..3b2352a 100644
unlink(buf->savecache);
buf->savecache = NULL;
diff --git a/config.guess b/config.guess
-index 51fab47..0967f2a 100755
+index 51fab47..31e01ef 100755
--- a/config.guess
+++ b/config.guess
@@ -1,13 +1,12 @@
@@ -2228,10 +2333,10 @@ index 51fab47..0967f2a 100755
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-+# Copyright 1992-2016 Free Software Foundation, Inc.
++# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2004-03-12'
-+timestamp='2016-04-02'
++timestamp='2017-11-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -2246,7 +2351,7 @@ index 51fab47..0967f2a 100755
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+# along with this program; if not, see <http://www.gnu.org/licenses/>.
++# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -2266,7 +2371,7 @@ index 51fab47..0967f2a 100755
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# You can get the latest version of this script from:
-+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
++# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
@@ -2275,13 +2380,22 @@ index 51fab47..0967f2a 100755
me=`echo "$0" | sed -e 's,.*/,,'`
+@@ -42,7 +39,7 @@ Usage: $0 [OPTION]
+
+ Output the configuration name of the system \`$me' is run on.
+
+-Operation modes:
++Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
@@ -53,8 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-+Copyright 1992-2016 Free Software Foundation, Inc.
++Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -2353,7 +2467,7 @@ index 51fab47..0967f2a 100755
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
-@@ -151,22 +168,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -151,22 +168,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
@@ -2377,10 +2491,13 @@ index 51fab47..0967f2a 100755
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
+- # to ELF recently, or will in the future.
++ # to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
-- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-+ arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
++ earm*)
++ os=netbsdelf
++ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
@@ -2388,7 +2505,7 @@ index 51fab47..0967f2a 100755
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
-@@ -176,7 +201,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -176,7 +204,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
@@ -2404,7 +2521,7 @@ index 51fab47..0967f2a 100755
;;
esac
# The OS release
-@@ -189,78 +221,48 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -189,78 +224,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
release='-gnu'
;;
*)
@@ -2478,6 +2595,9 @@ index 51fab47..0967f2a 100755
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ exit ;;
++ *:MidnightBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE}
++ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit 0 ;;
@@ -2497,6 +2617,9 @@ index 51fab47..0967f2a 100755
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
++ *:Redox:*:*)
++ echo ${UNAME_MACHINE}-unknown-redox
++ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -2508,7 +2631,7 @@ index 51fab47..0967f2a 100755
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
-@@ -270,76 +272,82 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -270,76 +281,73 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
@@ -2567,22 +2690,20 @@ index 51fab47..0967f2a 100755
- Alpha*:OpenVMS:*:*)
- echo alpha-hp-vms
- exit 0 ;;
+- Alpha\ *:Windows_NT*:*)
+- # How do we know it's Interix rather than the generic POSIX subsystem?
+- # Should we change UNAME_MACHINE based on the output of uname instead
+- # of the specific Alpha model?
+- echo alpha-pc-interix
+- exit 0 ;;
+- 21064:Windows_NT:50:3)
+- echo alpha-dec-winnt3.5
+- exit 0 ;;
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
-- exit 0 ;;
-+ exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
-- exit 0 ;;
-+ exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit 0;;
@@ -2773,7 +2894,22 @@ index 51fab47..0967f2a 100755
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
-@@ -467,35 +494,36 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -455,47 +482,48 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ #endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
++ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
++ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
++ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ #endif
+ #endif
exit (-1);
}
EOF
@@ -2871,7 +3007,7 @@ index 51fab47..0967f2a 100755
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
-@@ -553,49 +581,54 @@ EOF
+@@ -553,125 +581,140 @@ EOF
exit(0);
}
EOF
@@ -2912,8 +3048,9 @@ index 51fab47..0967f2a 100755
*:AIX:*:*)
echo rs6000-ibm-aix
- exit 0 ;;
+- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
++ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
- exit 0 ;;
+ exit ;;
@@ -2940,7 +3077,10 @@ index 51fab47..0967f2a 100755
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
-@@ -604,74 +637,84 @@ EOF
+- 9000/31? ) HP_ARCH=m68000 ;;
+- 9000/[34]?? ) HP_ARCH=m68k ;;
++ 9000/31?) HP_ARCH=m68000 ;;
++ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
@@ -3074,7 +3214,7 @@ index 51fab47..0967f2a 100755
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
-@@ -699,340 +742,351 @@ EOF
+@@ -699,356 +742,356 @@ EOF
exit (0);
}
EOF
@@ -3083,8 +3223,9 @@ index 51fab47..0967f2a 100755
+ { echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
- exit 0 ;;
+- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
++ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
- exit 0 ;;
+ exit ;;
@@ -3095,8 +3236,9 @@ index 51fab47..0967f2a 100755
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit 0 ;;
+- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
++ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
- exit 0 ;;
+ exit ;;
@@ -3219,10 +3361,11 @@ index 51fab47..0967f2a 100755
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
-+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-+ *)
-+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ UNAME_PROCESSOR=x86_64 ;;
++ i386)
++ UNAME_PROCESSOR=i586 ;;
+ esac
++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -3239,16 +3382,21 @@ index 51fab47..0967f2a 100755
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
-+ i*:windows32*:*)
-+ # uname -m includes "-pc" on this system.
-+ echo ${UNAME_MACHINE}-mingw32
-+ exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit 0 ;;
+- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+- echo i${UNAME_MACHINE}-pc-mks
+- exit 0 ;;
+- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+- # How do we know it's Interix rather than the generic POSIX subsystem?
+- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+- # UNAME_MACHINE based on the output of uname instead of i386?
+- echo i586-pc-interix
+- exit 0 ;;
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
@@ -3262,31 +3410,16 @@ index 51fab47..0967f2a 100755
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
-- exit 0 ;;
-+ exit ;;
-+ 8664:Windows_NT:*)
-+ echo x86_64-pc-mks
-+ exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
-- exit 0 ;;
-+ exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
+- p*:CYGWIN*:*)
+- echo powerpcle-unknown-cygwin
+- exit 0 ;;
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
-- exit 0 ;;
-+ exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
@@ -3455,6 +3588,9 @@ index 51fab47..0967f2a 100755
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
++ mips64el:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
@@ -3494,6 +3630,9 @@ index 51fab47..0967f2a 100755
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
++ riscv32:Linux:*:* | riscv64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
@@ -3631,11 +3770,12 @@ index 51fab47..0967f2a 100755
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
+- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
++ i*86:*:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-@@ -1040,15 +1094,16 @@ EOF
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
@@ -3655,7 +3795,7 @@ index 51fab47..0967f2a 100755
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-@@ -1066,73 +1121,86 @@ EOF
+@@ -1066,73 +1109,86 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
@@ -3769,7 +3909,7 @@ index 51fab47..0967f2a 100755
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
-@@ -1140,278 +1208,203 @@ EOF
+@@ -1140,291 +1196,239 @@ EOF
else
echo ns32k-sni-sysv
fi
@@ -3884,14 +4024,21 @@ index 51fab47..0967f2a 100755
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-+ grep IS_64BIT_ARCH >/dev/null
++ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
++ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
++ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
++ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_PPC >/dev/null
++ then
++ UNAME_PROCESSOR=powerpc
++ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -3918,17 +4065,21 @@ index 51fab47..0967f2a 100755
*:QNX:*:4*)
echo i386-pc-qnx
- exit 0 ;;
+- NSR-?:NONSTOP_KERNEL:*:*)
+ exit ;;
-+ NEO-?:NONSTOP_KERNEL:*:*)
++ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
++ NSR-*:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
++ NSX-*:NONSTOP_KERNEL:*:*)
++ echo nsx-tandem-nsk${UNAME_RELEASE}
++ exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit 0 ;;
@@ -4078,7 +4229,8 @@ index 51fab47..0967f2a 100755
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
--
++echo "$0: unable to guess system type" >&2
+
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
@@ -4092,7 +4244,11 @@ index 51fab47..0967f2a 100755
- struct utsname un;
-
- uname(&un);
--
++case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in
++ mips:Linux | mips64:Linux)
++ # If we got here on MIPS GNU/Linux, output extra information.
++ cat >&2 <<EOF
+
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
@@ -4130,7 +4286,9 @@ index 51fab47..0967f2a 100755
-
- exit (1);
-}
--EOF
++NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
++the system type. Please install a C compiler and try again.
+ EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
-
@@ -4163,23 +4321,45 @@ index 51fab47..0967f2a 100755
- exit 0 ;;
- esac
-fi
--
++ ;;
++esac
+
cat >&2 <<EOF
- $0: unable to guess system type
+-$0: unable to guess system type
-@@ -1419,7 +1412,9 @@ This script, last modified $timestamp, has failed to recognize
- the operating system you are using. It is advised that you
- download the most up to date version of the config scripts from
+-This script, last modified $timestamp, has failed to recognize
+-the operating system you are using. It is advised that you
+-download the most up to date version of the config scripts from
++This script (version $timestamp), has failed to recognize the
++operating system you are using. If your script is old, overwrite *all*
++copies of config.guess and config.sub with the latest versions from:
- ftp://ftp.gnu.org/pub/gnu/config/
-+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
++ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+and
-+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
++ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+-If the version you run ($0) is already up to date, please
+-send the following data and any information you think might be
+-pertinent to <config-patches@gnu.org> in order to provide the needed
+-information to handle your system.
++If $0 has already been updated, send the following data and any
++information you think might be pertinent to config-patches@gnu.org to
++provide the necessary information to handle your system.
+
+ config.guess timestamp = $timestamp
- If the version you run ($0) is already up to date, please
- send the following data and any information you think might be
+@@ -1452,7 +1456,7 @@ EOF
+ exit 1
+
+ # Local variables:
+-# eval: (add-hook 'write-file-hooks 'time-stamp)
++# eval: (add-hook 'write-file-functions 'time-stamp)
+ # time-stamp-start: "timestamp='"
+ # time-stamp-format: "%:y-%02m-%02d"
+ # time-stamp-end: "'"
diff --git a/config.h.dist b/config.h.dist
-index 844a555..0440927 100644
+index 844a555..4d9c119 100644
--- a/config.h.dist
+++ b/config.h.dist
@@ -9,10 +9,10 @@
@@ -4195,8 +4375,16 @@ index 844a555..0440927 100644
/*
If you want to load and save URL history.
+@@ -210,6 +210,7 @@ typedef long clen_t;
+ #define HAVE_SRANDOM
+ #undef HAVE_GETPASSPHRASE
+ #define HAVE_CHDIR
++#define HAVE_MKDTEMP
+
+
+ #define SETJMP(env) sigsetjmp(env,1)
diff --git a/config.h.in b/config.h.in
-index 2f41eed..3b575e4 100644
+index 2f41eed..6ab3008 100644
--- a/config.h.in
+++ b/config.h.in
@@ -25,6 +25,7 @@
@@ -4216,7 +4404,15 @@ index 2f41eed..3b575e4 100644
#define ENABLE_REMOVE_TRAILINGSPACES
#undef MENU_THIN_FRAME
#undef USE_RAW_SCROLL
-@@ -209,6 +210,10 @@ typedef RETSIGTYPE MySignalHandler;
+@@ -142,6 +143,7 @@ typedef long clen_t;
+ #undef HAVE_SRANDOM
+ #undef HAVE_GETPASSPHRASE
+ #undef HAVE_CHDIR
++#undef HAVE_MKDTEMP
+ #undef HAVE_SETPGRP
+ #undef HAVE_SETLOCALE
+ #undef HAVE_LANGINFO_CODESET
+@@ -209,6 +211,10 @@ typedef RETSIGTYPE MySignalHandler;
#define SUPPORT_WIN9X_CONSOLE_MBCS 1
#endif
@@ -4228,7 +4424,7 @@ index 2f41eed..3b575e4 100644
#define DEFAULT_TERM "dosansi"
#else
diff --git a/config.sub b/config.sub
-index ba33103..8d39c4b 100755
+index ba33103..00f68b8 100755
--- a/config.sub
+++ b/config.sub
@@ -1,42 +1,40 @@
@@ -4236,10 +4432,10 @@ index ba33103..8d39c4b 100755
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-+# Copyright 1992-2016 Free Software Foundation, Inc.
++# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2004-03-12'
-+timestamp='2016-03-30'
++timestamp='2017-11-23'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
@@ -4267,7 +4463,7 @@ index ba33103..8d39c4b 100755
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-+# along with this program; if not, see <http://www.gnu.org/licenses/>.
++# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -4288,12 +4484,12 @@ index ba33103..8d39c4b 100755
# Otherwise, we print the canonical config type on stdout and succeed.
+# You can get the latest version of this script from:
-+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
++# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
-@@ -55,8 +53,7 @@ timestamp='2004-03-12'
+@@ -55,12 +53,11 @@ timestamp='2004-03-12'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
@@ -4303,13 +4499,18 @@ index ba33103..8d39c4b 100755
Canonicalize a configuration name.
+-Operation modes:
++Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
@@ -70,8 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-+Copyright 1992-2016 Free Software Foundation, Inc.
++Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -4346,7 +4547,7 @@ index ba33103..8d39c4b 100755
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-+ kopensolaris*-gnu* | \
++ kopensolaris*-gnu* | cloudabi*-eabi* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -4405,7 +4606,7 @@ index ba33103..8d39c4b 100755
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-@@ -203,6 +217,12 @@ case $os in
+@@ -203,15 +217,18 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
@@ -4418,7 +4619,16 @@ index ba33103..8d39c4b 100755
-lynx*)
os=-lynxos
;;
-@@ -227,57 +247,114 @@ case $basic_machine in
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+- -windowsnt*)
+- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+- ;;
+ -psos*)
+ os=-psos
+ ;;
+@@ -227,57 +244,115 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
@@ -4440,8 +4650,9 @@ index ba33103..8d39c4b 100755
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+- | i370 | i860 | i960 | ia64 \
+ | hexagon \
- | i370 | i860 | i960 | ia64 \
++ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | mcore \
+ | k1om \
@@ -4483,6 +4694,7 @@ index ba33103..8d39c4b 100755
| pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
++ | pru \
| pyramid \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | riscv32 | riscv64 \
@@ -4494,6 +4706,9 @@ index ba33103..8d39c4b 100755
- | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
+- | we32k \
+- | x86 | xscale | xstormy16 | xtensa \
+- | z8k)
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
@@ -4501,9 +4716,7 @@ index ba33103..8d39c4b 100755
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
- | we32k \
-- | x86 | xscale | xstormy16 | xtensa \
-- | z8k)
++ | wasm32 \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
basic_machine=$basic_machine-unknown
@@ -4549,7 +4762,7 @@ index ba33103..8d39c4b 100755
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
-@@ -293,59 +370,89 @@ case $basic_machine in
+@@ -293,59 +368,91 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
@@ -4576,8 +4789,9 @@ index ba33103..8d39c4b 100755
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+- | i*86-* | i860-* | i960-* | ia64-* \
+ | hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
++ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | k1om-* \
@@ -4623,6 +4837,7 @@ index ba33103..8d39c4b 100755
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
++ | pru-* \
| pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
@@ -4645,6 +4860,7 @@ index ba33103..8d39c4b 100755
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | visium-* \
++ | wasm32-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
- | xtensa-* \
@@ -4742,7 +4958,7 @@ index ba33103..8d39c4b 100755
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
-@@ -481,6 +627,14 @@ case $basic_machine in
+@@ -481,14 +627,30 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
@@ -4757,7 +4973,24 @@ index ba33103..8d39c4b 100755
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
-@@ -592,7 +746,6 @@ case $basic_machine in
+ ;;
+- dpx2* | dpx2*-bull)
++ dpx2*)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
++ e500v[12])
++ basic_machine=powerpc-unknown
++ os=$os"spe"
++ ;;
++ e500v[12]-*)
++ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++ os=$os"spe"
++ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+@@ -592,7 +754,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
@@ -4765,7 +4998,7 @@ index ba33103..8d39c4b 100755
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
-@@ -631,6 +784,17 @@ case $basic_machine in
+@@ -631,6 +792,17 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
@@ -4783,7 +5016,7 @@ index ba33103..8d39c4b 100755
m88k-omron*)
basic_machine=m88k-omron
;;
-@@ -642,10 +806,21 @@ case $basic_machine in
+@@ -642,10 +814,21 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
@@ -4806,7 +5039,7 @@ index ba33103..8d39c4b 100755
miniframe)
basic_machine=m68000-convergent
;;
-@@ -659,10 +834,6 @@ case $basic_machine in
+@@ -659,10 +842,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
@@ -4817,7 +5050,7 @@ index ba33103..8d39c4b 100755
monitor)
basic_machine=m68k-rom68k
os=-coff
-@@ -671,14 +842,29 @@ case $basic_machine in
+@@ -671,14 +850,29 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
@@ -4847,7 +5080,16 @@ index ba33103..8d39c4b 100755
ncr3000)
basic_machine=i486-ncr
os=-sysv4
-@@ -743,9 +929,11 @@ case $basic_machine in
+@@ -707,7 +901,7 @@ case $basic_machine in
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+- next | m*-next )
++ next | m*-next)
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+@@ -743,20 +937,24 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
@@ -4862,7 +5104,11 @@ index ba33103..8d39c4b 100755
;;
nsr-tandem)
basic_machine=nsr-tandem
-@@ -754,9 +942,8 @@ case $basic_machine in
+ ;;
++ nsx-tandem)
++ basic_machine=nsx-tandem
++ ;;
+ op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
@@ -4873,7 +5119,7 @@ index ba33103..8d39c4b 100755
;;
os400)
basic_machine=powerpc-ibm
-@@ -778,6 +965,14 @@ case $basic_machine in
+@@ -778,6 +976,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
@@ -4888,7 +5134,7 @@ index ba33103..8d39c4b 100755
pbd)
basic_machine=sparc-tti
;;
-@@ -787,6 +982,12 @@ case $basic_machine in
+@@ -787,6 +993,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
@@ -4901,7 +5147,7 @@ index ba33103..8d39c4b 100755
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
-@@ -816,9 +1017,10 @@ case $basic_machine in
+@@ -816,11 +1028,12 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
@@ -4912,9 +5158,21 @@ index ba33103..8d39c4b 100755
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+- ppcle | powerpclittle | ppc-le | powerpc-little)
++ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
-@@ -843,6 +1045,14 @@ case $basic_machine in
+ ;;
+ ppcle-* | powerpclittle-*)
+@@ -830,7 +1043,7 @@ case $basic_machine in
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
++ ppc64le | powerpc64little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+@@ -843,6 +1056,14 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
@@ -4929,7 +5187,7 @@ index ba33103..8d39c4b 100755
rom68k)
basic_machine=m68k-rom68k
os=-coff
-@@ -869,6 +1079,10 @@ case $basic_machine in
+@@ -869,6 +1090,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
@@ -4940,7 +5198,7 @@ index ba33103..8d39c4b 100755
sei)
basic_machine=mips-sei
os=-seiux
-@@ -880,6 +1094,9 @@ case $basic_machine in
+@@ -880,6 +1105,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
@@ -4950,7 +5208,7 @@ index ba33103..8d39c4b 100755
sh64)
basic_machine=sh64-unknown
;;
-@@ -901,6 +1118,9 @@ case $basic_machine in
+@@ -901,6 +1129,9 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
@@ -4960,7 +5218,7 @@ index ba33103..8d39c4b 100755
sun2)
basic_machine=m68000-sun
;;
-@@ -957,17 +1177,9 @@ case $basic_machine in
+@@ -957,17 +1188,9 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
@@ -4981,10 +5239,23 @@ index ba33103..8d39c4b 100755
;;
tx39)
basic_machine=mipstx39-unknown
-@@ -1029,9 +1241,16 @@ case $basic_machine in
+@@ -1021,6 +1244,9 @@ case $basic_machine in
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
++ wasm32)
++ basic_machine=wasm32-unknown
++ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+@@ -1029,9 +1255,19 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
++ x64)
++ basic_machine=x86_64-pc
++ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
@@ -4998,7 +5269,7 @@ index ba33103..8d39c4b 100755
ymp)
basic_machine=ymp-cray
os=-unicos
-@@ -1040,6 +1259,10 @@ case $basic_machine in
+@@ -1040,6 +1276,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
@@ -5009,7 +5280,7 @@ index ba33103..8d39c4b 100755
none)
basic_machine=none-none
os=-none
-@@ -1059,6 +1282,9 @@ case $basic_machine in
+@@ -1059,6 +1299,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
@@ -5019,7 +5290,7 @@ index ba33103..8d39c4b 100755
rs6000)
basic_machine=rs6000-ibm
;;
-@@ -1075,13 +1301,10 @@ case $basic_machine in
+@@ -1075,13 +1318,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
@@ -5035,14 +5306,14 @@ index ba33103..8d39c4b 100755
basic_machine=sparc-sun
;;
cydra)
-@@ -1125,9 +1348,12 @@ esac
+@@ -1125,9 +1365,12 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
-+ # First match some system type aliases
-+ # that might get confused with valid system types.
++ # First match some system type aliases that might get confused
++ # with valid system types.
# -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
@@ -5050,8 +5321,15 @@ index ba33103..8d39c4b 100755
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-@@ -1148,26 +1374,32 @@ case $os in
- # Each alternative MUST END IN A *, to match a version number.
+@@ -1143,31 +1386,37 @@ case $os in
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+- # First accept the basic system types.
++ # Now accept the basic system types.
+ # The portable systems comes first.
+- # Each alternative MUST END IN A *, to match a version number.
++ # Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
@@ -5074,9 +5352,9 @@ index ba33103..8d39c4b 100755
- | -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
-+ | -chorusos* | -chorusrdb* | -cegcc* \
++ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@@ -5087,11 +5365,11 @@ index ba33103..8d39c4b 100755
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-+ | -onefs* | -tirtos*)
++ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
-@@ -1185,7 +1417,7 @@ case $os in
+@@ -1185,7 +1434,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
@@ -5100,7 +5378,7 @@ index ba33103..8d39c4b 100755
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
-@@ -1206,7 +1438,7 @@ case $os in
+@@ -1206,7 +1455,7 @@ case $os in
-opened*)
os=-openedition
;;
@@ -5109,7 +5387,16 @@ index ba33103..8d39c4b 100755
os=-os400
;;
-wince*)
-@@ -1255,7 +1487,7 @@ case $os in
+@@ -1242,7 +1491,7 @@ case $os in
+ -nova*)
+ os=-rtmk-nova
+ ;;
+- -ns2 )
++ -ns2)
+ os=-nextstep2
+ ;;
+ -nsk*)
+@@ -1255,7 +1504,7 @@ case $os in
-sinix*)
os=-sysv4
;;
@@ -5118,7 +5405,7 @@ index ba33103..8d39c4b 100755
os=-tpf
;;
-triton*)
-@@ -1291,8 +1523,15 @@ case $os in
+@@ -1291,8 +1540,28 @@ case $os in
-aros*)
os=-aros
;;
@@ -5130,13 +5417,26 @@ index ba33103..8d39c4b 100755
+ -dicos*)
+ os=-dicos
+ ;;
++ -pikeos*)
++ # Until real need of OS specific support for
++ # particular features comes up, bare metal
++ # configurations are quite functional.
++ case $basic_machine in
++ arm*)
++ os=-eabi
++ ;;
++ *)
++ os=-elf
++ ;;
++ esac
++ ;;
+ -nacl*)
+ ;;
+ -ios)
;;
-none)
;;
-@@ -1316,6 +1555,12 @@ else
+@@ -1316,6 +1585,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
@@ -5149,7 +5449,7 @@ index ba33103..8d39c4b 100755
*-acorn)
os=-riscix1.2
;;
-@@ -1325,9 +1570,24 @@ case $basic_machine in
+@@ -1325,9 +1600,24 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
@@ -5177,7 +5477,7 @@ index ba33103..8d39c4b 100755
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
-@@ -1346,13 +1606,13 @@ case $basic_machine in
+@@ -1346,13 +1636,13 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
@@ -5194,7 +5494,13 @@ index ba33103..8d39c4b 100755
mips*-cisco)
os=-elf
;;
-@@ -1371,9 +1631,15 @@ case $basic_machine in
+@@ -1368,12 +1658,21 @@ case $basic_machine in
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
++ pru-*)
++ os=-elf
++ ;;
*-be)
os=-beos
;;
@@ -5210,7 +5516,16 @@ index ba33103..8d39c4b 100755
*-wec)
os=-proelf
;;
-@@ -1476,7 +1742,7 @@ case $basic_machine in
+@@ -1407,7 +1706,7 @@ case $basic_machine in
+ m88k-omron*)
+ os=-luna
+ ;;
+- *-next )
++ *-next)
+ os=-nextstep
+ ;;
+ *-sequent)
+@@ -1476,7 +1775,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
@@ -5219,7 +5534,7 @@ index ba33103..8d39c4b 100755
vendor=ibm
;;
-beos*)
-@@ -1539,7 +1805,7 @@ case $basic_machine in
+@@ -1539,10 +1838,10 @@ case $basic_machine in
esac
echo $basic_machine$os
@@ -5227,9 +5542,13 @@ index ba33103..8d39c4b 100755
+exit
# Local variables:
- # eval: (add-hook 'write-file-hooks 'time-stamp)
+-# eval: (add-hook 'write-file-hooks 'time-stamp)
++# eval: (add-hook 'write-file-functions 'time-stamp)
+ # time-stamp-start: "timestamp='"
+ # time-stamp-format: "%:y-%02m-%02d"
+ # time-stamp-end: "'"
diff --git a/configure b/configure
-index 4c1bc06..140f050 100755
+index 4c1bc06..8699b43 100755
--- a/configure
+++ b/configure
@@ -1486,11 +1486,11 @@ Optional Packages:
@@ -5332,6 +5651,15 @@ index 4c1bc06..140f050 100755
for lib in $with_termlib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_tgetent" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l$lib" >&5
+@@ -8766,7 +8767,7 @@ _ACEOF
+
+
+
+-for ac_func in strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale
++for ac_func in strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir mkdtemp getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale
+ do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -8986,7 +8987,7 @@ extern char *sys_errlist[];
int
main ()
@@ -5372,9 +5700,18 @@ index 4c1bc06..140f050 100755
"libwc/Makefile") CONFIG_FILES="$CONFIG_FILES libwc/Makefile" ;;
"w3mimg/Makefile") CONFIG_FILES="$CONFIG_FILES w3mimg/Makefile" ;;
diff --git a/configure.ac b/configure.ac
-index 7308fc6..320a6e2 100644
+index 7308fc6..ebb3282 100644
--- a/configure.ac
+++ b/configure.ac
+@@ -150,7 +150,7 @@ dnl AC_FUNC_MEMCMP
+ dnl AC_FUNC_MMAP
+ dnl AC_FUNC_SETVBUF_REVERSED
+ dnl AC_FUNC_VPRINTF
+-AC_CHECK_FUNCS(strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale)
++AC_CHECK_FUNCS(strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir mkdtemp getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale)
+ AC_FUNC_STRFTIME
+ AC_FUNC_WAIT3
+ AC_FUNC_SETPGRP
@@ -172,7 +172,7 @@ AC_SUBST(RC_DIR)
RC_DIR="~/.$PACKAGE"
AC_DEFINE(RC_DIR, "$RC_DIR")
@@ -9249,14 +9586,16 @@ 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..47d5fd6 100644
+index 4aedfde..ac3f4a3 100644
--- a/doc-jp/README.SSL
+++ b/doc-jp/README.SSL
-@@ -25,9 +25,9 @@ SSL
+@@ -24,10 +24,10 @@ SSL
+ ・ SSL に関して以下の設定が可能になってます:
ssl_forbid_method
- 使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t: TLSv1)
+- 使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t: TLSv1)
- (デフォルトは<NULL>).
++ 使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)
+ (デフォルトは2, 3).
ssl_verify_server ON/OFF
- SSLのサーバ認証を行う(デフォルトはOFF).
@@ -9377,6 +9716,18 @@ index 0000000..90066f7
+http://www.example.com/ABC/
+
+ただし、ホスト名の部分は常に小文字に変換してから比較します。
+diff --git a/doc-jp/README.tab b/doc-jp/README.tab
+index 61f7c58..99a1220 100644
+--- a/doc-jp/README.tab
++++ b/doc-jp/README.tab
+@@ -38,6 +38,6 @@ w3m $B$r%?%V%V%i%&%62=(B
+ open_tab_blank $B!D(B target $B$,(B _blank $B$+(B _new $B$N>l9g$O?7$7$$%?%V$G3+$/(B
+ $B%G%U%)%k%H$O(B OFF
+ close_tab_back $B!D(B $BLa$k;~$K%P%C%U%!$,:G8e$J$i%?%V$rJD$8$k(B
+- $B%G%U%)%k%H$O(B OFF (= Can't back...)
++ $B%G%U%)%k%H$O(B OFF (= Can't go back...)
+
+ $B$rDI2C$7$F$$$^$9!#(B
diff --git a/doc-jp/keymap.lynx b/doc-jp/keymap.lynx
index 869c716..e4085c8 100644
--- a/doc-jp/keymap.lynx
@@ -13910,6 +14261,19 @@ index 0000000..588afc4
+ environmental variable.
+
+ $ W3M_IMG2SIXEL="img2sixel -d atkinson" w3m -sixel http://...
+diff --git a/doc/README.tab b/doc/README.tab
+index 8e98e1c..f237f70 100644
+--- a/doc/README.tab
++++ b/doc/README.tab
+@@ -39,7 +39,7 @@ Options:
+ open_tab_blank ... open new tab if target is _blank or _new
+ default: OFF
+ close_tab_back ... close the tab when you back from last buffer in the tab
+- default: OFF (= Can't back...)
++ default: OFF (= Can't go back...)
+
+
+
diff --git a/doc/keymap.lynx b/doc/keymap.lynx
index 869c716..e4085c8 100644
--- a/doc/keymap.lynx
@@ -14453,7 +14817,7 @@ index 8fe1215..37c4f15 100644
QuietMessage = TRUE;
fmInitialized = FALSE;
diff --git a/file.c b/file.c
-index 567d41e..4d15ff1 100644
+index 567d41e..9b0e947 100644
--- a/file.c
+++ b/file.c
@@ -26,6 +26,8 @@
@@ -14990,10 +15354,11 @@ index 567d41e..4d15ff1 100644
Strcat_char(tmp, ' ');
}
break;
-@@ -3732,6 +3753,75 @@ process_input(struct parsed_tag *tag)
+@@ -3731,6 +3752,75 @@ process_input(struct parsed_tag *tag)
+ return tmp;
}
- Str
++Str
+process_button(struct parsed_tag *tag)
+{
+ Str tmp = NULL;
@@ -15062,10 +15427,9 @@ index 567d41e..4d15ff1 100644
+ return tmp;
+}
+
-+Str
+ Str
process_select(struct parsed_tag *tag)
{
- Str tmp = NULL;
@@ -3926,7 +4016,7 @@ process_textarea(struct parsed_tag *tag, int width)
cur_textarea_size = 20;
if (parsedtag_get_value(tag, ATTR_COLS, &p)) {
@@ -15383,7 +15747,8 @@ index 567d41e..4d15ff1 100644
+ buf->document_charset);
if (!buf->baseURL)
buf->baseURL = New(ParsedURL);
- parseURL(p, buf->baseURL, NULL);
+- parseURL(p, buf->baseURL, NULL);
++ parseURL2(p, buf->baseURL, &buf->currentURL);
+#if defined(USE_M17N) || defined(USE_IMAGE)
+ base = buf->baseURL;
+#endif
@@ -16142,7 +16507,7 @@ index 8378939..96d3ab3 100644
global double image_scale init(100);
#endif
diff --git a/form.c b/form.c
-index b7556ca..0605513 100644
+index b7556ca..bc14d39 100644
--- a/form.c
+++ b/form.c
@@ -10,8 +10,10 @@
@@ -16156,7 +16521,20 @@ index b7556ca..0605513 100644
#include "menu.h"
#endif /* MENU_SELECT */
-@@ -122,10 +124,12 @@ formList_addInput(struct form_list *fl, struct parsed_tag *tag)
+@@ -54,10 +56,9 @@ newFormList(char *action, char *method, char *charset, char *enctype,
+ m = FORM_METHOD_INTERNAL;
+ /* unknown method is regarded as 'get' */
+
+- if (enctype != NULL && !strcasecmp(enctype, "multipart/form-data")) {
++ if (m != FORM_METHOD_GET && enctype != NULL &&
++ !strcasecmp(enctype, "multipart/form-data")) {
+ e = FORM_ENCTYPE_MULTIPART;
+- if (m == FORM_METHOD_GET)
+- m = FORM_METHOD_POST;
+ }
+
+ #ifdef USE_M17N
+@@ -122,10 +123,12 @@ formList_addInput(struct form_list *fl, struct parsed_tag *tag)
parsedtag_get_value(tag, ATTR_SIZE, &item->size);
parsedtag_get_value(tag, ATTR_MAXLENGTH, &item->maxlength);
item->readonly = parsedtag_exists(tag, ATTR_READONLY);
@@ -16171,7 +16549,7 @@ index b7556ca..0605513 100644
item->select_option = select_option[i].first;
#endif /* MENU_SELECT */
if (parsedtag_get_value(tag, ATTR_ROWS, &p))
-@@ -196,7 +200,7 @@ formtype(char *typestr)
+@@ -196,7 +199,7 @@ formtype(char *typestr)
if (!strcasecmp(typestr, _formtypetbl[i]))
return i;
}
@@ -16180,7 +16558,7 @@ index b7556ca..0605513 100644
}
void
-@@ -316,7 +320,8 @@ form_update_line(Line *line, char **str, int spos, int epos, int width,
+@@ -316,7 +319,8 @@ form_update_line(Line *line, char **str, int spos, int epos, int width,
pos += width - w;
len = line->len + pos + spos - epos;
@@ -16190,7 +16568,7 @@ index b7556ca..0605513 100644
prop = New_N(Lineprop, len);
bcopy((void *)line->lineBuf, (void *)buf, spos * sizeof(char));
bcopy((void *)line->propBuf, (void *)prop, spos * sizeof(Lineprop));
-@@ -438,6 +443,9 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
+@@ -438,6 +442,9 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
switch (form->type) {
case FORM_INPUT_CHECKBOX:
case FORM_INPUT_RADIO:
@@ -16200,7 +16578,7 @@ index b7556ca..0605513 100644
if (form->checked)
buf->currentLine->lineBuf[spos] = '*';
else
-@@ -455,8 +463,14 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
+@@ -455,8 +462,14 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
}
else
#endif /* MENU_SELECT */
@@ -16215,7 +16593,16 @@ index b7556ca..0605513 100644
if (form->type == FORM_TEXTAREA) {
int n = a->y - buf->currentLine->linenumber;
if (n > 0)
-@@ -477,6 +491,9 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
+@@ -469,6 +482,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
+ rows = form->rows ? form->rows : 1;
+ col = COLPOS(l, a->start.pos);
+ for (c_rows = 0; c_rows < rows; c_rows++, l = l->next) {
++ if (l == NULL)
++ break;
+ if (rows > 1) {
+ pos = columnPos(l, col);
+ a = retrieveAnchor(buf->formitem, l->linenumber, pos);
+@@ -477,6 +492,9 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
spos = a->start.pos;
epos = a->end.pos;
}
@@ -16225,7 +16612,7 @@ index b7556ca..0605513 100644
pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col,
rows > 1,
form->type == FORM_INPUT_PASSWORD);
-@@ -787,7 +804,7 @@ struct pre_form {
+@@ -787,7 +805,7 @@ struct pre_form {
static struct pre_form *PreForm = NULL;
static struct pre_form *
@@ -16234,7 +16621,7 @@ index b7556ca..0605513 100644
{
ParsedURL pu;
struct pre_form *new;
-@@ -796,21 +813,13 @@ add_pre_form(struct pre_form *prev, char *url, char *name, char *action)
+@@ -796,21 +814,13 @@ add_pre_form(struct pre_form *prev, char *url, char *name, char *action)
new = prev->next = New(struct pre_form);
else
new = PreForm = New(struct pre_form);
@@ -16260,7 +16647,7 @@ index b7556ca..0605513 100644
new->name = (name && *name) ? name : NULL;
new->action = (action && *action) ? action : NULL;
new->item = NULL;
-@@ -834,7 +843,7 @@ add_pre_form_item(struct pre_form *pf, struct pre_form_item *prev, int type,
+@@ -834,7 +844,7 @@ add_pre_form_item(struct pre_form *pf, struct pre_form_item *prev, int type,
new->name = name;
new->value = value;
if (checked && *checked && (!strcmp(checked, "0") ||
@@ -16269,7 +16656,7 @@ index b7556ca..0605513 100644
|| !strcasecmp(checked, "no")))
new->checked = 0;
else
-@@ -875,6 +884,7 @@ loadPreForm(void)
+@@ -875,6 +885,7 @@ loadPreForm(void)
return;
while (1) {
char *p, *s, *arg;
@@ -16277,7 +16664,7 @@ index b7556ca..0605513 100644
line = Strfgets(fp);
if (line->length == 0)
-@@ -890,18 +900,20 @@ loadPreForm(void)
+@@ -890,18 +901,20 @@ loadPreForm(void)
if (*p == '#' || *p == '\0')
continue; /* comment or empty line */
s = getWord(&p);
@@ -16300,7 +16687,7 @@ index b7556ca..0605513 100644
if (!strcmp(s, "form")) {
if (!arg || !*arg)
continue;
-@@ -913,7 +925,7 @@ loadPreForm(void)
+@@ -913,7 +926,7 @@ loadPreForm(void)
}
if (pf->item) {
struct pre_form *prev = pf;
@@ -18803,7 +19190,7 @@ index c0461df..f0c6242 100644
int quoted;
char *q = NULL;
diff --git a/main.c b/main.c
-index b421943..85b0003 100644
+index b421943..43e181c 100644
--- a/main.c
+++ b/main.c
@@ -1,6 +1,7 @@
@@ -18833,7 +19220,7 @@ index b421943..85b0003 100644
static void
fversion(FILE * f)
{
-@@ -200,10 +206,12 @@ fusage(FILE * f, int err)
+@@ -200,9 +206,11 @@ fusage(FILE * f, int err)
#ifdef USE_M17N
fprintf(f, " -I charset document charset\n");
fprintf(f, " -O charset display/output charset\n");
@@ -18841,11 +19228,10 @@ index b421943..85b0003 100644
fprintf(f, " -e EUC-JP\n");
fprintf(f, " -s Shift_JIS\n");
fprintf(f, " -j JIS\n");
- #endif
+#endif
+ #endif
fprintf(f, " -B load bookmark\n");
fprintf(f, " -bookmark file specify bookmark file\n");
- fprintf(f, " -T type specify content-type\n");
@@ -214,7 +222,7 @@ fusage(FILE * f, int err)
#endif /* USE_COLOR */
fprintf(f,
@@ -18855,10 +19241,12 @@ index b421943..85b0003 100644
fprintf(f,
" -cols width specify column width (used with -dump)\n");
fprintf(f,
-@@ -248,8 +256,12 @@ fusage(FILE * f, int err)
+@@ -247,9 +255,13 @@ fusage(FILE * f, int err)
+ " -cookie use cookie (-no-cookie: don't use cookie)\n");
#endif /* USE_COOKIE */
fprintf(f, " -graph use DEC special graphics for border of table and menu\n");
- fprintf(f, " -no-graph use ACII character for border of table and menu\n");
+- fprintf(f, " -no-graph use ACII character for border of table and menu\n");
++ fprintf(f, " -no-graph use ASCII character for border of table and menu\n");
+#if 1 /* pager requires -s */
+ fprintf(f, " -s squeeze multiple blank lines\n");
+#else
@@ -19718,6 +20106,15 @@ index b421943..85b0003 100644
{
Buffer *buf = Currentbuf->linkBuffer[LB_N_FRAME];
+@@ -3970,7 +4105,7 @@ DEFUN(backBf, BACK, "Back to previous buffer")
+ }
+ else
+ /* FIXME: gettextize? */
+- disp_message("Can't back...", TRUE);
++ disp_message("Can't go back...", TRUE);
+ return;
+ }
+
@@ -4008,8 +4143,7 @@ DEFUN(backBf, BACK, "Back to previous buffer")
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -20275,7 +20672,18 @@ index b421943..85b0003 100644
}
void
-@@ -5772,7 +5975,7 @@ w3m_exit(int i)
+@@ -5768,11 +5971,18 @@ w3m_exit(int i)
+ #endif
+ #ifdef __MINGW32_VERSION
+ WSACleanup();
++#endif
++#ifdef HAVE_MKDTEMP
++ if (no_rc_dir && tmp_dir != rc_dir)
++ if (rmdir(tmp_dir) != 0) {
++ fprintf(stderr, "Can't remove temporary directory (%s)!\n", tmp_dir);
++ exit(1);
++ }
+ #endif
exit(i);
}
@@ -20284,7 +20692,7 @@ index b421943..85b0003 100644
{
char *data, *p;
int cmd;
-@@ -5900,7 +6103,7 @@ setAlarmEvent(AlarmEvent * event, int sec, short status, int cmd, void *data)
+@@ -5900,7 +6110,7 @@ setAlarmEvent(AlarmEvent * event, int sec, short status, int cmd, void *data)
}
#endif
@@ -20293,7 +20701,7 @@ index b421943..85b0003 100644
{
char *resource = searchKeyData();
-@@ -5969,8 +6172,7 @@ DEFUN(reinit, REINIT, "Reload configuration files")
+@@ -5969,8 +6179,7 @@ DEFUN(reinit, REINIT, "Reload configuration files")
ptr, FALSE);
}
@@ -20303,7 +20711,7 @@ index b421943..85b0003 100644
{
char *data;
-@@ -6031,7 +6233,7 @@ _newT(void)
+@@ -6031,7 +6240,7 @@ _newT(void)
nTab++;
}
@@ -20312,7 +20720,7 @@ index b421943..85b0003 100644
{
_newT();
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
-@@ -6142,7 +6344,7 @@ deleteTab(TabBuffer * tab)
+@@ -6142,7 +6351,7 @@ deleteTab(TabBuffer * tab)
return FirstTab;
}
@@ -20321,7 +20729,7 @@ index b421943..85b0003 100644
{
TabBuffer *tab;
-@@ -6157,7 +6359,7 @@ DEFUN(closeT, CLOSE_TAB, "Close current tab")
+@@ -6157,7 +6366,7 @@ DEFUN(closeT, CLOSE_TAB, "Close current tab")
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
}
@@ -20330,7 +20738,7 @@ index b421943..85b0003 100644
{
int i;
-@@ -6172,7 +6374,7 @@ DEFUN(nextT, NEXT_TAB, "Move to next tab")
+@@ -6172,7 +6381,7 @@ DEFUN(nextT, NEXT_TAB, "Move to next tab")
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
}
@@ -20339,7 +20747,7 @@ index b421943..85b0003 100644
{
int i;
-@@ -6236,7 +6438,7 @@ followTab(TabBuffer * tab)
+@@ -6236,7 +6445,7 @@ followTab(TabBuffer * tab)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -20348,7 +20756,7 @@ index b421943..85b0003 100644
{
followTab(prec_num ? numTab(PREC_NUM) : NULL);
}
-@@ -6277,13 +6479,13 @@ tabURL0(TabBuffer * tab, char *prompt, int relative)
+@@ -6277,13 +6486,13 @@ tabURL0(TabBuffer * tab, char *prompt, int relative)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -20364,7 +20772,7 @@ index b421943..85b0003 100644
{
tabURL0(prec_num ? numTab(PREC_NUM) : NULL,
"Goto relative URL on new tab: ", TRUE);
-@@ -6328,7 +6530,7 @@ moveTab(TabBuffer * t, TabBuffer * t2, int right)
+@@ -6328,7 +6537,7 @@ moveTab(TabBuffer * t, TabBuffer * t2, int right)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -20373,7 +20781,7 @@ index b421943..85b0003 100644
{
TabBuffer *tab;
int i;
-@@ -6338,7 +6540,7 @@ DEFUN(tabR, TAB_RIGHT, "Move current tab right")
+@@ -6338,7 +6547,7 @@ DEFUN(tabR, TAB_RIGHT, "Move current tab right")
moveTab(CurrentTab, tab ? tab : LastTab, TRUE);
}
@@ -20382,7 +20790,7 @@ index b421943..85b0003 100644
{
TabBuffer *tab;
int i;
-@@ -6547,7 +6749,7 @@ stopDownload(void)
+@@ -6547,7 +6756,7 @@ stopDownload(void)
}
/* download panel */
@@ -20706,22 +21114,23 @@ index 774b1bd..b0c890d 100644
new_option_menu(&menu, label, &key, NULL);
menu.initial = 0;
-@@ -2025,7 +2069,6 @@ list_menu(Buffer *buf)
+@@ -2024,7 +2068,6 @@ list_menu(Buffer *buf)
+ }
label[nitem] = NULL;
- set_menu_frame();
- set_menu_frame();
+ set_menu_frame();
new_option_menu(&menu, label, &key, NULL);
- menu.initial = 0;
diff --git a/mimehead.c b/mimehead.c
index 78997e0..d16270c 100644
--- a/mimehead.c
+++ b/mimehead.c
-@@ -64,12 +64,22 @@ ha2d(char x, char y)
+@@ -63,13 +63,23 @@ ha2d(char x, char y)
+
Str
decodeB(char **ww)
- {
++{
+ struct growbuf gb;
+
+ growbuf_init(&gb);
@@ -20731,7 +21140,7 @@ index 78997e0..d16270c 100644
+
+void
+decodeB_to_growbuf(struct growbuf *gb, char **ww)
-+{
+ {
unsigned char c[4];
char *wp = *ww;
char d[3];
@@ -20771,7 +21180,7 @@ index 78997e0..d16270c 100644
Str
decodeU(char **ww)
- {
++{
+ struct growbuf gb;
+
+ growbuf_init(&gb);
@@ -20781,7 +21190,7 @@ index 78997e0..d16270c 100644
+
+void
+decodeU_to_growbuf(struct growbuf *gb, char **ww)
-+{
+ {
unsigned char c1, c2;
char *w = *ww;
int n, i;
@@ -20811,10 +21220,11 @@ index 78997e0..d16270c 100644
}
/* RFC2047 (4.2. The "Q" encoding) */
-@@ -165,9 +187,19 @@ decodeQ(char **ww)
+@@ -164,10 +186,20 @@ decodeQ(char **ww)
+ /* RFC2045 (6.7. Quoted-Printable Content-Transfer-Encoding) */
Str
decodeQP(char **ww)
- {
++{
+ struct growbuf gb;
+
+ growbuf_init(&gb);
@@ -20824,7 +21234,7 @@ index 78997e0..d16270c 100644
+
+void
+decodeQP_to_growbuf(struct growbuf *gb, char **ww)
-+{
+ {
char *w = *ww;
- Str a = Strnew_size(strlen(w));
@@ -20938,7 +21348,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..96489c1
+index 0000000..b4dcd36
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,936 @@
@@ -21536,8 +21946,8 @@ index 0000000..96489c1
+msgstr "Datei mit PEM-kodierten Zertifikaten von CAs"
+
+#: rc.c:205
-+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
-+msgstr "Liste unzul辰ssiger SSL-Verfahren (2: SSLv2, 3: SSLv3, t: TLSv1)"
++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)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
@@ -21879,7 +22289,7 @@ index 0000000..96489c1
+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..3810d30 100644
+index d67c695..95a5341 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1,6 +1,6 @@
@@ -22609,9 +23019,11 @@ index d67c695..3810d30 100644
msgstr "SSL茯荐弱PEM綵√頥惹悟召<ゃ"
-#: rc.c:195
+-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)"
- msgstr "篏帥SSL<純鴻(2: SSLv2, 3: SSLv3, t:TLSv1)"
++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)"
-#: rc.c:198
+#: rc.c:208
@@ -23017,7 +23429,7 @@ index d67c695..3810d30 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..607e26f 100644
+index e164b1e..bf38ef8 100644
--- a/po/w3m.pot
+++ b/po/w3m.pot
@@ -1,6 +1,6 @@
@@ -23743,8 +24155,9 @@ index e164b1e..607e26f 100644
msgstr ""
-#: 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)"
++msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t: TLSv1.0, 5: TLSv1.1)"
msgstr ""
-#: rc.c:198
@@ -24152,7 +24565,7 @@ index e164b1e..607e26f 100644
msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
-index 0000000..8cfa8fd
+index 0000000..cf25e22
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,916 @@
@@ -24745,8 +25158,8 @@ index 0000000..8cfa8fd
+msgstr " PEM 膽 CA 莚箙篁"
+
+#: rc.c:205
-+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
-+msgstr "茴胼罩∝ SSL 劫茵 (2: SSLv2, 3: SSLv3, t:TLSv1)"
++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)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
@@ -25074,7 +25487,7 @@ index 0000000..8cfa8fd
+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..954a4d2
+index 0000000..44f7a14
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,916 @@
@@ -25667,8 +26080,8 @@ index 0000000..954a4d2
+msgstr " PEM 膩腆 CA 茘悟罟罅"
+
+#: rc.c:205
-+msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
-+msgstr "茴胼罩∝ SSL 劫茵 (2: SSLv2, 3: SSLv3, t:TLSv1)"
++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)"
+
+#: rc.c:208
+msgid "Enable cookie processing"
@@ -26137,7 +26550,7 @@ index f8a7345..ed8f890 100644
-
-#include "indep.h"
diff --git a/rc.c b/rc.c
-index 8441a39..7de87b8 100644
+index 8441a39..3fd84ef 100644
--- a/rc.c
+++ b/rc.c
@@ -9,7 +9,9 @@
@@ -26181,6 +26594,15 @@ index 8441a39..7de87b8 100644
#define CMT_FTPPASS N_("Password for anonymous FTP (your mail address)")
#define CMT_FTPPASS_HOSTNAMEGEN N_("Generate domain part of password for FTP")
#define CMT_USERAGENT N_("User-Agent identification string")
+@@ -192,7 +202,7 @@ static int OptionEncode = FALSE;
+ #define CMT_SSL_CA_PATH N_("Path to directory for PEM encoded certificates of CAs")
+ #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)")
+ #endif /* USE_SSL */
+ #ifdef USE_COOKIE
+ #define CMT_USECOOKIE N_("Enable cookie processing")
@@ -390,6 +400,8 @@ struct param_ptr params1[] = {
NULL},
{"graphic_char", P_CHARINT, PI_SEL_C, (void *)&UseGraphicChar,
@@ -26253,7 +26675,49 @@ index 8441a39..7de87b8 100644
if (AcceptLang == NULL || *AcceptLang == '\0') {
/* TRANSLATORS:
-@@ -1483,6 +1512,7 @@ panel_set_option(struct parsed_tagarg *arg)
+@@ -1250,7 +1279,7 @@ init_rc(void)
+ if (stat(rc_dir, &st) < 0) {
+ if (errno == ENOENT) { /* no directory */
+ if (do_mkdir(rc_dir, 0700) < 0) {
+- fprintf(stderr, "Can't create config directory (%s)!", rc_dir);
++ /* fprintf(stderr, "Can't create config directory (%s)!\n", rc_dir); */
+ goto rc_dir_err;
+ }
+ else {
+@@ -1258,17 +1287,17 @@ init_rc(void)
+ }
+ }
+ else {
+- fprintf(stderr, "Can't open config directory (%s)!", rc_dir);
++ /* fprintf(stderr, "Can't open config directory (%s)!\n", rc_dir); */
+ goto rc_dir_err;
+ }
+ }
+ if (!S_ISDIR(st.st_mode)) {
+ /* not a directory */
+- fprintf(stderr, "%s is not a directory!", rc_dir);
++ /* fprintf(stderr, "%s is not a directory!\n", rc_dir); */
+ goto rc_dir_err;
+ }
+ if (!(st.st_mode & S_IWUSR)) {
+- fprintf(stderr, "%s is not writable!", rc_dir);
++ /* fprintf(stderr, "%s is not writable!\n", rc_dir); */
+ goto rc_dir_err;
+ }
+ no_rc_dir = FALSE;
+@@ -1301,6 +1330,11 @@ init_rc(void)
+ ((tmp_dir = getenv("TMP")) == NULL || *tmp_dir == '\0') &&
+ ((tmp_dir = getenv("TEMP")) == NULL || *tmp_dir == '\0'))
+ tmp_dir = "/tmp";
++#ifdef HAVE_MKDTEMP
++ tmp_dir = mkdtemp(Strnew_m_charp(tmp_dir, "/w3m-XXXXXX", NULL)->ptr);
++ if (tmp_dir == NULL)
++ tmp_dir = rc_dir;
++#endif
+ create_option_search_table();
+ goto open_rc;
+ }
+@@ -1483,6 +1517,7 @@ panel_set_option(struct parsed_tagarg *arg)
{
FILE *f = NULL;
char *p;
@@ -26261,7 +26725,7 @@ index 8441a39..7de87b8 100644
if (config_file == NULL) {
disp_message("There's no config file... config not saved", FALSE);
-@@ -1498,14 +1528,17 @@ panel_set_option(struct parsed_tagarg *arg)
+@@ -1498,14 +1533,17 @@ panel_set_option(struct parsed_tagarg *arg)
if (arg->value) {
p = conv_to_system(arg->value);
if (set_param(arg->arg, p)) {
@@ -26282,7 +26746,7 @@ index 8441a39..7de87b8 100644
sync_with_option();
backBf();
}
-@@ -1556,3 +1589,217 @@ helpFile(char *base)
+@@ -1556,3 +1594,217 @@ helpFile(char *base)
return expandPath(Strnew_m_charp(w3m_help_dir(), "/", base, NULL)->ptr);
}
#endif
@@ -26523,18 +26987,9 @@ index 5bee4b2..93406e8 100644
YIELD(1, c, 7);
return 0;
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
-index 4da9ce5..3384813 100644
+index 4da9ce5..5beb9b0 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
-@@ -34,7 +34,7 @@ CONF_DIR = $(sysconfdir)/$(PACKAGE)
- DOCDIRS = @DOCDIRS@
-
- AUXBIN_TARGETS = xface2xpm
--LIB_TARGETS = dirlist.cgi w3mhelp.cgi w3mmail.cgi
-+LIB_TARGETS = dirlist.cgi w3mdict.cgi w3mhelp.cgi w3mmail.cgi
- HELP_TARGETS = w3mhelp-funcname.pl w3mhelp-funcdesc-stamp
- SUBDIRS = multipart w3mman
- .PHONY: $(SUBDIRS)
@@ -60,7 +60,7 @@ w3mhelp-funcname.pl: w3mhelp-funcname.pl.in ../funcname.tab $(top_srcdir)/doc/ke
@cat $(srcdir)/w3mhelp-funcname.pl.in >> w3mhelp-funcname.pl
@echo "done"
@@ -26544,6 +26999,24 @@ index 4da9ce5..3384813 100644
@echo "generating w3mhelp-funcdesc*.pl..."
@for dirlang in $(DOCDIRS); do \
dir=`expr "$$dirlang" : "\(.*\):.*"`; \
+@@ -87,7 +87,7 @@ install: $(LIB_TARGETS) $(HELP_TARGETS)
+ do \
+ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(AUXBIN_DIR); \
+ done
+- for file in $(LIB_TARGETS); \
++ for file in w3mdict.cgi $(LIB_TARGETS); \
+ do \
+ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(CGIBIN_DIR); \
+ done
+@@ -105,7 +105,7 @@ uninstall:
+ do \
+ rm -f $(AUXBIN_DIR)/$$file; \
+ done
+- -for file in $(LIB_TARGETS); \
++ -for file in w3mdict.cgi $(LIB_TARGETS); \
+ do \
+ rm -f $(LIB_DIR)/$$file; \
+ done
diff --git a/scripts/w3mdict.cgi b/scripts/w3mdict.cgi
new file mode 100755
index 0000000..6b0e62e
@@ -26978,7 +27451,7 @@ index 569e2fc..ad1cffe 100644
> $(distdir)/w3mman.tar.gz
-rm -fr $(distdir)/w3mman
diff --git a/scripts/w3mman/w3mman.1.in b/scripts/w3mman/w3mman.1.in
-index 1c0361d..904fb5d 100644
+index 1c0361d..8c433a7 100644
--- a/scripts/w3mman/w3mman.1.in
+++ b/scripts/w3mman/w3mman.1.in
@@ -1,4 +1,4 @@
@@ -27057,7 +27530,7 @@ index 1c0361d..904fb5d 100644
.TP
.I @libexecdir@/@PACKAGE@/cgi-bin/w3mman2html.cgi
-convert manual page to html.
-+manual page to HTML convertor.
++manual page to HTML converter.
.SH SEE ALSO
.BR man (1),
.BR w3m (1).
@@ -27204,7 +27677,7 @@ index 50475ae..c047c56 100644
buf[i] = (*p == ' ') ? NBSP_CODE : *p;
diff --git a/table.c b/table.c
-index e1243ff..221db92 100644
+index e1243ff..4f193e1 100644
--- a/table.c
+++ b/table.c
@@ -188,7 +188,7 @@ dv2sv(double *dv, short *iv, int size)
@@ -27320,7 +27793,22 @@ index e1243ff..221db92 100644
setwidth(tbl, mode);
feed_table_inline_tag(tbl, line, mode, -1);
clearcontentssize(tbl, mode);
-@@ -2546,8 +2566,10 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
+@@ -2336,10 +2356,14 @@ feed_table_block_tag(struct table *tbl,
+ if (mode->indent_level < MAX_INDENT_LEVEL)
+ tbl->indent -= INDENT_INCR;
+ }
++ if (tbl->indent < 0)
++ tbl->indent = 0;
+ offset = tbl->indent;
+ if (cmd == HTML_DT) {
+ if (mode->indent_level > 0 && mode->indent_level <= MAX_INDENT_LEVEL)
+ offset -= INDENT_INCR;
++ if (offset < 0)
++ offset = 0;
+ }
+ if (tbl->indent > 0) {
+ check_minimum0(tbl, 0);
+@@ -2546,8 +2570,10 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
}
}
#ifdef ID_EXT
@@ -27332,7 +27820,7 @@ index e1243ff..221db92 100644
#endif /* ID_EXT */
tbl->trattr = align | valign;
break;
-@@ -2572,7 +2594,7 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
+@@ -2572,7 +2598,7 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
}
tbl->col++;
check_row(tbl, tbl->row);
@@ -27341,7 +27829,7 @@ index e1243ff..221db92 100644
tbl->col++;
}
if (tbl->col > MAXCOL - 1) {
-@@ -2600,12 +2622,16 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
+@@ -2600,12 +2626,16 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
if ((tbl->row + rowspan) >= tbl->max_rowsize)
check_row(tbl, tbl->row + rowspan);
}
@@ -27358,7 +27846,7 @@ index e1243ff..221db92 100644
if (parsedtag_get_value(tag, ATTR_ALIGN, &i)) {
switch (i) {
case ALIGN_LEFT:
-@@ -2878,6 +2904,14 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
+@@ -2878,6 +2908,14 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
tmp = process_input(tag);
feed_table1(tbl, tmp, mode, width);
break;
@@ -27373,7 +27861,7 @@ index e1243ff..221db92 100644
case HTML_SELECT:
tmp = process_select(tag);
if (tmp)
-@@ -3010,7 +3044,6 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
+@@ -3010,7 +3048,6 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
break;
case HTML_TABLE_ALT:
id = -1;
@@ -27407,7 +27895,7 @@ index f9b7b76..f5a2c30 100644
/fieldset HTML_N_FIELDSET
iframe HTML_IFRAME
diff --git a/terms.c b/terms.c
-index 7a3c987..3d2ffd7 100644
+index 7a3c987..a636ac0 100644
--- a/terms.c
+++ b/terms.c
@@ -12,6 +12,7 @@
@@ -27700,6 +28188,33 @@ index 7a3c987..3d2ffd7 100644
#ifdef USE_MOUSE
#define W3M_TERM_INFO(name, title, mouse) name, title, mouse
#define NEED_XTERM_ON (1)
+@@ -563,7 +823,7 @@ ttymode_set(int mode, int imode)
+ while (TerminalSet(tty, &ioval) == -1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+- printf("Error occured while set %x: errno=%d\n", mode, errno);
++ printf("Error occurred while set %x: errno=%d\n", mode, errno);
+ reset_error_exit(SIGNAL_ARGLIST);
+ }
+ #endif
+@@ -584,7 +844,7 @@ ttymode_reset(int mode, int imode)
+ while (TerminalSet(tty, &ioval) == -1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+- printf("Error occured while reset %x: errno=%d\n", mode, errno);
++ printf("Error occurred while reset %x: errno=%d\n", mode, errno);
+ reset_error_exit(SIGNAL_ARGLIST);
+ }
+ #endif /* __MINGW32_VERSION */
+@@ -601,7 +861,7 @@ set_cc(int spec, int val)
+ while (TerminalSet(tty, &ioval) == -1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+- printf("Error occured: errno=%d\n", errno);
++ printf("Error occurred: errno=%d\n", errno);
+ reset_error_exit(SIGNAL_ARGLIST);
+ }
+ }
@@ -634,7 +894,8 @@ reset_tty(void)
writestr(T_se); /* reset terminal */
flush_tty();
@@ -27737,6 +28252,15 @@ index 7a3c987..3d2ffd7 100644
}
else
#endif
+@@ -2019,7 +2282,7 @@ sleep_till_anykey(int sec, int purge)
+ }
+ er = TerminalSet(tty, &ioval);
+ if (er == -1) {
+- printf("Error occured: errno=%d\n", errno);
++ printf("Error occurred: errno=%d\n", errno);
+ reset_error_exit(SIGNAL_ARGLIST);
+ }
+ return ret;
@@ -2027,8 +2290,8 @@ sleep_till_anykey(int sec, int purge)
#ifdef USE_MOUSE
@@ -27749,7 +28273,7 @@ index 7a3c987..3d2ffd7 100644
#define CYGWIN_OFF {fputs("\033[?1000l",ttyf); flush_tty();}
diff --git a/url.c b/url.c
-index ed6062e..0378913 100644
+index ed6062e..d759383 100644
--- a/url.c
+++ b/url.c
@@ -121,6 +121,7 @@ static struct table2 DefaultGuess[] = {
@@ -27768,9 +28292,14 @@ index ed6062e..0378913 100644
option = SSL_OP_ALL;
if (ssl_forbid_method) {
if (strchr(ssl_forbid_method, '2'))
-@@ -337,7 +339,15 @@ openSSLHandle(int sock, char *hostname, char **p_cert)
+@@ -336,8 +338,20 @@ 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;
++ if (strchr(ssl_forbid_method, '5'))
++ option |= SSL_OP_NO_TLSv1_1;
}
+#ifdef SSL_OP_NO_COMPRESSION
+ option |= SSL_OP_NO_COMPRESSION;
@@ -27784,7 +28313,7 @@ index ed6062e..0378913 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 +454,8 @@ baseURL(Buffer *buf)
+@@ -444,6 +458,8 @@ baseURL(Buffer *buf)
/* <BASE> tag is defined in the document */
return buf->baseURL;
}
@@ -27793,7 +28322,7 @@ index ed6062e..0378913 100644
else
return &buf->currentURL;
}
-@@ -638,16 +650,21 @@ openSocket(char *const hostname,
+@@ -638,16 +654,21 @@ openSocket(char *const hostname,
#define COPYPATH_SPC_ALLOW 0
#define COPYPATH_SPC_IGNORE 1
#define COPYPATH_SPC_REPLACE 2
@@ -27819,7 +28348,7 @@ index ed6062e..0378913 100644
break;
case COPYPATH_SPC_IGNORE:
/* do nothing */
-@@ -658,7 +675,7 @@ copyPath(char *orgpath, int length, int option)
+@@ -658,7 +679,7 @@ copyPath(char *orgpath, int length, int option)
}
}
else
@@ -27828,7 +28357,7 @@ index ed6062e..0378913 100644
orgpath++;
length--;
}
-@@ -668,22 +685,14 @@ copyPath(char *orgpath, int length, int option)
+@@ -668,22 +689,14 @@ copyPath(char *orgpath, int length, int option)
void
parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
{
@@ -27853,7 +28382,7 @@ index ed6062e..0378913 100644
/* RFC1808: Relative Uniform Resource Locators
* 4. Resolving Relative URLs
-@@ -694,7 +703,7 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
+@@ -694,7 +707,7 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
goto do_label;
}
#if defined( __EMX__ ) || defined( __CYGWIN__ )
@@ -27862,7 +28391,7 @@ index ed6062e..0378913 100644
p_url->scheme = SCM_LOCAL;
p += 17 - 1;
url += 17 - 1;
-@@ -802,19 +811,20 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
+@@ -802,19 +815,20 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
/* scheme://user:pass@host or
* scheme://host:port
*/
@@ -27887,7 +28416,7 @@ index ed6062e..0378913 100644
tmp = Strnew_charp_n(q, p - q);
p_url->port = atoi(tmp->ptr);
/* *p is one of ['\0', '/', '?', '#'] */
-@@ -822,15 +832,19 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
+@@ -822,15 +836,19 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
case '@':
/* scheme://user@... */
p_url->user = copyPath(q, p - q, COPYPATH_SPC_IGNORE);
@@ -27910,7 +28439,7 @@ index ed6062e..0378913 100644
break;
}
analyze_file:
-@@ -956,12 +970,16 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
+@@ -956,12 +974,16 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
p_url->label = NULL;
}
@@ -27929,10 +28458,11 @@ index ed6062e..0378913 100644
p->scheme = q->scheme;
p->port = q->port;
p->is_nocache = q->is_nocache;
-@@ -1280,9 +1298,23 @@ getURLScheme(char **url)
+@@ -1279,10 +1301,24 @@ getURLScheme(char **url)
+ return scheme;
}
- static char *
++static char *
+schemeNumToName(int scheme)
+{
+ int i;
@@ -27944,7 +28474,7 @@ index ed6062e..0378913 100644
+ return NULL;
+}
+
-+static char *
+ static char *
otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
{
Str s = Strnew();
@@ -27953,7 +28483,7 @@ index ed6062e..0378913 100644
Strcat_charp(s, "User-Agent: ");
if (UserAgent == NULL || *UserAgent == '\0')
-@@ -1306,7 +1338,12 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
+@@ -1306,7 +1342,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");
}
@@ -27967,7 +28497,7 @@ index ed6062e..0378913 100644
#ifdef USE_SSL
if (current && current->scheme == SCM_HTTPS && target->scheme != SCM_HTTPS) {
/* Don't send Referer: if https:// -> http:// */
-@@ -1314,6 +1351,7 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
+@@ -1314,6 +1355,7 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
else
#endif
if (referer == NULL && current && current->scheme != SCM_LOCAL &&
@@ -27975,7 +28505,7 @@ index ed6062e..0378913 100644
(current->scheme != SCM_FTP ||
(current->user == NULL && current->pass == NULL))) {
char *p = current->label;
-@@ -1384,7 +1422,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
+@@ -1384,7 +1426,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
{
Str tmp;
TextListItem *i;
@@ -27983,7 +28513,7 @@ index ed6062e..0378913 100644
#ifdef USE_COOKIE
Str cookie;
#endif /* USE_COOKIE */
-@@ -1400,7 +1437,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
+@@ -1400,7 +1441,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) {
@@ -27991,7 +28521,7 @@ index ed6062e..0378913 100644
#ifdef USE_SSL
if (hr->command == HR_COMMAND_CONNECT)
continue;
-@@ -1430,20 +1466,20 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
+@@ -1430,20 +1470,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) {
@@ -28016,7 +28546,7 @@ index ed6062e..0378913 100644
if (header_string)
Strcat(tmp, header_string);
Strcat_charp(tmp, "\r\n");
-@@ -1603,7 +1639,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1603,7 +1643,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,
@@ -28025,7 +28555,7 @@ index ed6062e..0378913 100644
FTP_proxy_parsed.port);
if (sock < 0)
return uf;
-@@ -1645,15 +1681,15 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1645,15 +1685,15 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
}
else if (pu->scheme == SCM_HTTPS) {
sock = openSocket(HTTPS_proxy_parsed.host,
@@ -28045,7 +28575,7 @@ index ed6062e..0378913 100644
#ifdef USE_SSL
sslh = NULL;
}
-@@ -1685,8 +1721,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1685,8 +1725,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
}
}
else {
@@ -28055,7 +28585,7 @@ index ed6062e..0378913 100644
if (sock < 0) {
*status = HTST_MISSING;
return uf;
-@@ -1750,7 +1785,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1750,7 +1789,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,
@@ -28064,7 +28594,7 @@ index ed6062e..0378913 100644
GOPHER_proxy_parsed.port);
if (sock < 0)
return uf;
-@@ -1758,8 +1793,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
+@@ -1758,8 +1797,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
tmp = HTTPrequest(pu, current, hr, extra_header);
}
else {
@@ -28074,7 +28604,7 @@ index ed6062e..0378913 100644
if (sock < 0)
return uf;
if (pu->file == NULL)
-@@ -2049,7 +2083,7 @@ filename_extension(char *path, int is_url)
+@@ -2049,7 +2087,7 @@ filename_extension(char *path, int is_url)
break;
}
if (*last_dot == '.') {
@@ -28083,7 +28613,7 @@ index ed6062e..0378913 100644
if (is_url && !IS_ALNUM(last_dot[i]))
break;
}
-@@ -2234,3 +2268,66 @@ schemeToProxy(int scheme)
+@@ -2234,3 +2272,66 @@ schemeToProxy(int scheme)
}
return pu;
}
@@ -29206,7 +29736,7 @@ index 36e3b62..f1e8d97 100644
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "fb.h"
diff --git a/w3mimg/fb/fb_w3mimg.c b/w3mimg/fb/fb_w3mimg.c
-index d3ae5a9..fb323f5 100644
+index d3ae5a9..62511f0 100644
--- a/w3mimg/fb/fb_w3mimg.c
+++ b/w3mimg/fb/fb_w3mimg.c
@@ -153,10 +153,15 @@ check_tty_console(char *tty)
@@ -29231,8 +29761,8 @@ index d3ae5a9..fb323f5 100644
- if (!check_tty_console(getenv("W3M_TTY")) && strcmp("jfbterm", getenv("TERM")) != 0) {
+ if (!check_tty_console(getenv("W3M_TTY")) &&
-+ strcmp("jfbterm", getenv("TERM")) != 0 &&
-+ strncmp("jfbterm-", getenv("TERM"), 8) != 0) {
++ strncmp("fbterm", getenv("TERM"), 6) != 0 &&
++ strncmp("jfbterm", getenv("TERM"), 7) != 0) {
fprintf(stderr, "w3mimgdisplay/fb: tty is not console\n");
goto error;
}