aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--NEWS3
-rw-r--r--fm.h6
-rw-r--r--main.c20
-rw-r--r--rc.c4
5 files changed, 31 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 31b9a88..32c6b16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-02-20 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [w3m-dev 03058] mailer
+ * NEWS: rc: mailer
+ * fm.h (Mailer): change default
+ * main.c (MAIN): $MAILER will be used as "mailer"
+ * main.c (followA): if "mailer" defined & simple mailto: URL,
+ use mailer instead of w3mmail.cgi
+ * main.c (cmd_loadURL): ditto
+ * rc.c (params6): remove ifndef USE_W3MMAILER
+
2002-02-15 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03056] DISPLAY_IMAGE, STOP_IMAGE don't work.
@@ -2944,4 +2955,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.319 2002/02/14 15:10:29 ukai Exp $
+$Id: ChangeLog,v 1.320 2002/02/19 15:25:19 ukai Exp $
diff --git a/NEWS b/NEWS
index ca283cc..31599d3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
w3m 0.3?
+* rc: mailer
+ if mailer is set, it will be used for simple mailto: URLs
+ otherwise, w3mmail.cgi will be used (when USE_W3MMAILER defined)
* rc: max_load_image
* rc: display_image, auto_image, image_scale, imgdisplay, imgsize
* func: DISPLAY_IMAGE, STOP_IMAGE
diff --git a/fm.h b/fm.h
index a6621d0..3fe38a6 100644
--- a/fm.h
+++ b/fm.h
@@ -1,4 +1,4 @@
-/* $Id: fm.h,v 1.50 2002/02/05 12:31:27 ukai Exp $ */
+/* $Id: fm.h,v 1.51 2002/02/19 15:25:19 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -826,7 +826,9 @@ global int useExtImageViewer init(TRUE);
global int maxLoadImage init(4);
#endif
global char *Editor init(DEF_EDITOR);
-#ifndef USE_W3MMAILER
+#ifdef USE_W3MMAILER
+global char *Mailer init(NULL);
+#else
global char *Mailer init(DEF_MAILER);
#endif
global char *ExtBrowser init(DEF_EXT_BROWSER);
diff --git a/main.c b/main.c
index 852de83..9c422ba 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.83 2002/02/14 15:10:30 ukai Exp $ */
+/* $Id: main.c,v 1.84 2002/02/19 15:25:19 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -446,10 +446,8 @@ MAIN(int argc, char **argv, char **envp)
if (Editor == NULL && (p = getenv("EDITOR")) != NULL)
Editor = p;
-#ifndef USE_W3MMAILER
if (Mailer == NULL && (p = getenv("MAILER")) != NULL)
Mailer = p;
-#endif
/* argument search 2 */
i = 1;
@@ -2725,8 +2723,11 @@ followA(void)
return;
}
}
-#ifndef USE_W3MMAILER
- if (!strncasecmp(a->url, "mailto:", 7)) {
+ if (!strncasecmp(a->url, "mailto:", 7)
+#ifdef USE_W3MMAILER
+ && non_null(Mailer) && strchr(a->url, '?') == NULL
+#endif
+ ) {
/* invoke external mailer */
fmTerm();
system(myExtCommand(Mailer, shell_quote(url_unquote(a->url + 7)),
@@ -2735,7 +2736,6 @@ followA(void)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
return;
}
-#endif
#ifdef USE_NNTP
else if (!strncasecmp(a->url, "news:", 5) && strchr(a->url, '@') == NULL) {
/* news:newsgroup is not supported */
@@ -3677,8 +3677,11 @@ cmd_loadURL(char *url, ParsedURL *current, char *referer)
{
Buffer *buf;
-#ifndef USE_W3MMAILER
- if (!strncasecmp(url, "mailto:", 7)) {
+ if (!strncasecmp(url, "mailto:", 7)
+#ifdef USE_W3MMAILER
+ && non_null(Mailer) && strchr(url, '?') == NULL
+#endif
+ ) {
/* invoke external mailer */
fmTerm();
system(myExtCommand(Mailer, shell_quote(url_unquote(url + 7)),
@@ -3687,7 +3690,6 @@ cmd_loadURL(char *url, ParsedURL *current, char *referer)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
return;
}
-#endif
#ifdef USE_NNTP
if (!strncasecmp(url, "news:", 5) && strchr(url, '@') == NULL) {
/* news:newsgroup is not supported */
diff --git a/rc.c b/rc.c
index 782a1df..5315bf8 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.39 2002/02/04 15:18:42 ukai Exp $ */
+/* $Id: rc.c,v 1.40 2002/02/19 15:25:19 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -595,9 +595,7 @@ struct param_ptr params6[] = {
CMT_URIMETHODMAP, NULL},
#endif
{"editor", P_STRING, PI_TEXT, (void *)&Editor, CMT_EDITOR, NULL},
-#ifndef USE_W3MMAILER
{"mailer", P_STRING, PI_TEXT, (void *)&Mailer, CMT_MAILER, NULL},
-#endif
{"extbrowser", P_STRING, PI_TEXT, (void *)&ExtBrowser, CMT_EXTBRZ, NULL},
{"extbrowser2", P_STRING, PI_TEXT, (void *)&ExtBrowser2, CMT_EXTBRZ2,
NULL},