w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 80ac96eb63afc40194560530f7838f0868a7891d
parent 1d7c06f86ea2349dcfcc45a5f20316f46190675a
Author: ukai <ukai>
Date:   Fri, 30 Nov 2001 14:06:27 +0000

modify AcceptLang

Diffstat:
MChangeLog | 5+++++
Mrc.c | 8++++++++
Murl.c | 13+------------
3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +2001-11-30 Fumitoshi UKAI <ukai@debian.or.jp> + + * url.c (otherinfo): use AcceptLang + * rc.c (sync_with_option): initialize AcceptLang + 2001-11-30 Tsutomu Okada <okada@furuno.co.jp> * [w3m-dev 02599] diff --git a/rc.c b/rc.c @@ -1091,6 +1091,14 @@ sync_with_option(void) #endif initMailcap(); initMimeTypes(); + + if (AcceptLang == NULL || *AcceptLang == '\0') { +#if LANG == JA + AcceptLang = "ja; q=1.0, en; q=0.5"; +#else /* LANG != JA (must be EN) */ + AcceptLang = "en; q=1.0"; +#endif + } if (AcceptEncoding == NULL || *AcceptEncoding == '\0') AcceptEncoding = acceptableEncoding(); if (AcceptMedia == NULL || *AcceptMedia == '\0') diff --git a/url.c b/url.c @@ -1200,19 +1200,8 @@ 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); + Strcat_m_charp(s, "Accept-Language: ", AcceptLang, "\r\n", NULL); - Strcat_charp(s, "Accept-Language: "); - if (AcceptLang != NULL && *AcceptLang != '\0') { - Strcat_charp(s, AcceptLang); - Strcat_charp(s, "\r\n"); - } - else { -#if LANG == JA - Strcat_charp(s, "ja; q=1.0, en; q=0.5\r\n"); -#else /* LANG != JA (must be EN) */ - Strcat_charp(s, "en; q=1.0\r\n"); -#endif /* LANG != JA */ - } if (target->host) { Strcat_charp(s, "Host: "); Strcat_charp(s, target->host);