commit 9b1348046276ff2adab9151498e1c7d2ed5e9133
parent 91d26cd6d39244ec9092022ca184fc378818653e
Author: ukai <ukai>
Date: Sat, 5 Jan 2002 16:13:27 +0000
[w3m-dev 02781] Re: Bug#127883: w3m tries to use xv as default
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat:
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,14 @@
+2002-01-06 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [w3m-dev 02781] Re: Bug#127883: w3m tries to use xv as default
+ * config.h.dist (DEF_IMAGE_VIEWER): added
+ * config.h.dist (DEF_AUDIO_PLAYER): added
+ * configure (def_image_viewer): added
+ * configure (def_audio_player): added
+ * configure (DEF_IMAGE_VIEWER): added
+ * configure (DEF_AUDIO_PLAYER): added
+ * mailcap.c (DefaultMailcap): use DEF_IMAGE_VIEWER, DEF_AUDIO_PLAYER
+
2002-01-05 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02779] `;' is valid in URL
diff --git a/config.h.dist b/config.h.dist
@@ -124,6 +124,10 @@ MODEL=Linux.i686-monster-ja
#define DEF_MAILER "/bin/mail"
#define DEF_EXT_BROWSER "/usr/bin/netscape"
+/* fallback viewer. mailcap override these configuration */
+#define DEF_IMAGE_VIEWER "xv"
+#define DEF_AUDIO_PLAYER "showaudio"
+
#define LIB_DIR "/usr/local/lib/w3m"
#define HELP_DIR "/usr/local/lib/w3m"
#define ETC_DIR "/usr/local/etc/w3m"
diff --git a/configure b/configure
@@ -770,6 +770,11 @@ readdir "$dbrowser"
brz=$_dir
echo "dbrowser='$brz'" >> config.param
+def_image_viewer=${def_image_viewer-xv}
+echo "def_image_viewer='$def_image_viewer'" >> config.param
+def_audio_player=${def_audio_player-showaudio}
+echo "def_audio_player='$def_audio_player'" >> config.param
+
if [ -z "$dcc" ]; then
if [ -n "$CC" ]; then
dcc="$CC"
@@ -2048,6 +2053,10 @@ $def_use_help_cgi
#define DEF_MAILER "$mailer"
#define DEF_EXT_BROWSER "$brz"
+/* fallback viewer. mailcap override these configuration */
+#define DEF_IMAGE_VIEWER "$def_image_viewer"
+#define DEF_AUDIO_PLAYER "$def_audio_player"
+
#define LIB_DIR "$libdir"
#define HELP_DIR "$helpdir"
#define ETC_DIR "$sysconfdir"
diff --git a/mailcap.c b/mailcap.c
@@ -7,8 +7,8 @@
#include "local.h"
static struct mailcap DefaultMailcap[] = {
- {"image/*", "xv %s", 0, NULL, NULL, NULL}, /* */
- {"audio/basic", "showaudio %s", 0, NULL, NULL, NULL},
+ {"image/*", DEF_IMAGE_VIEWER " %s", 0, NULL, NULL, NULL}, /* */
+ {"audio/basic", DEF_AUDIO_PLAYER " %s", 0, NULL, NULL, NULL},
{NULL, NULL, 0, NULL, NULL, NULL}
};