aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog16
-rwxr-xr-xconfigure4
-rw-r--r--fm.h4
-rw-r--r--rc.c14
-rw-r--r--url.c11
5 files changed, 37 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a8b3df..365af88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2001-11-30 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [w3m-dev 02597] (based on [w3m-dev 02594] by aito@fw.ipsj.or.jp)
+ * fm.h (AcceptLang): added
+ * fm.h (AcceptMedia): added
+ * rc.c (CMT_ACCEPTENCODING): added
+ * rc.c (CMT_ACCEPTMEDIA): added
+ * rc.c (params9): add accept_encoding, accept_media
+ * rc.c (sync_with_option): initialize AcceptEncoding and AcceptMedia
+ * url.c (otherinfo): use Strcat_m_charp()
+
+2001-11-30 aito@fw.ipsj.or.jp
+
+ * [w3m-dev 02594]
+ * configure: s/dcode/display_code/
+
2001-11-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02596]
diff --git a/configure b/configure
index ce134b4..d861c9a 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: configure,v 1.28 2001/11/30 09:54:22 ukai Exp $
+# $Id: configure,v 1.29 2001/11/30 10:49:06 ukai Exp $
# Configuration.
#
@@ -92,7 +92,7 @@ do
dmodel=6
;;
-code=*|--code=*)
- dcode=`expr "$1" : "-*code=\(.*\)"`
+ display_code=`expr "$1" : "-*code=\(.*\)"`
;;
-cflags=*|--cflags=*)
dcflags=`echo $1 | sed -e 's/-*cflags=//'`
diff --git a/fm.h b/fm.h
index b0d2d6c..a36c613 100644
--- a/fm.h
+++ b/fm.h
@@ -1,4 +1,4 @@
-/* $Id: fm.h,v 1.24 2001/11/30 09:54:22 ukai Exp $ */
+/* $Id: fm.h,v 1.25 2001/11/30 10:49:06 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -736,6 +736,8 @@ global int do_download init(FALSE);
global char *UserAgent init(NULL);
global int NoSendReferer init(FALSE);
global char *AcceptLang init(NULL);
+global char *AcceptEncoding init(NULL);
+global char *AcceptMedia init(NULL);
global int WrapDefault init(FALSE);
global int IgnoreCase init(TRUE);
global int WrapSearch init(FALSE);
diff --git a/rc.c b/rc.c
index 5bfcd1f..fe0382e 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.18 2001/11/30 09:54:22 ukai Exp $ */
+/* $Id: rc.c,v 1.19 2001/11/30 10:49:06 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -118,6 +118,8 @@ static char *config_file = NULL;
#define CMT_FTPPASS_HOSTNAMEGEN "FTPのパスワードのドメイン名を自動生成する"
#endif
#define CMT_USERAGENT "User-Agent"
+#define CMT_ACCEPTENCODING "圧縮方法(Accept-Encoding:)"
+#define CMT_ACCEPTMEDIA "受けつけるメディアタイプ(Accept:)"
#define CMT_ACCEPTLANG "受けつける言語(Accept-Language:)"
#define CMT_DOCUMENTCODE "文書の文字コード"
#define CMT_SYSTEMCODE "システムの文字コード"
@@ -231,6 +233,8 @@ static char *config_file = NULL;
#define CMT_FTPPASS_HOSTNAMEGEN "generate domain part of password for FTP"
#endif
#define CMT_USERAGENT "User-Agent"
+#define CMT_ACCEPTENCODING "Accept-Encoding"
+#define CMT_ACCEPTMEDIA "Accept"
#define CMT_ACCEPTLANG "Accept-Language"
/* #define CMT_DOCUMENTCODE "Document Charset" */
/* #define CMT_SYSTEMCODE "System Kanji Code" */
@@ -547,6 +551,10 @@ struct param_ptr params9[] = {
NULL},
{"accept_language", P_STRING, PI_TEXT, (void *)&AcceptLang, CMT_ACCEPTLANG,
NULL},
+ {"accept_encoding", P_STRING, PI_TEXT, (void *)&AcceptEncoding, CMT_ACCEPTENCODING,
+ NULL},
+ {"accept_media", P_STRING, PI_TEXT, (void *)&AcceptMedia, CMT_ACCEPTMEDIA,
+ NULL},
{"argv_is_url", P_CHARINT, PI_ONOFF, (void *)&ArgvIsURL, CMT_ARGV_IS_URL,
NULL},
{"retry_http", P_INT, PI_ONOFF, (void *)&retryAsHttp, CMT_RETRY_HTTP,
@@ -1082,6 +1090,10 @@ sync_with_option(void)
#endif
initMailcap();
initMimeTypes();
+ if (AcceptEncoding == NULL || *AcceptEncoding == '\0')
+ AcceptEncoding = acceptableEncoding();
+ if (AcceptMedia == NULL || *AcceptMedia == '\0')
+ AcceptMedia = acceptableMimeTypes();
}
void
diff --git a/url.c b/url.c
index 373c7e5..4ab1f24 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.13 2001/11/30 09:54:22 ukai Exp $ */
+/* $Id: url.c,v 1.14 2001/11/30 10:49:06 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -1198,13 +1198,8 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
Strcat_charp(s, UserAgent);
Strcat_charp(s, "\r\n");
- Strcat_charp(s, "Accept: ");
- Strcat_charp(s, acceptableMimeTypes());
- Strcat_charp(s, "\r\n");
-
- Strcat_charp(s, "Accept-Encoding: ");
- Strcat_charp(s, acceptableEncoding());
- Strcat_charp(s, "\r\n");
+ Strcat_m_charp(s, "Accept: ", AcceptMedia, "\r\n");
+ Strcat_m_charp(s, "Accept-Encoding: ", AcceptEncoding, "\r\n");
Strcat_charp(s, "Accept-Language: ");
if (AcceptLang != NULL && *AcceptLang != '\0') {