w3m

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

commit 19b7a891a961cff95a942ab93794a60e0dacfcab
parent ed35763382f58117701ab6a70bd19c5221d14c54
Author: ukai <ukai>
Date:   Tue, 19 Feb 2002 15:25:19 +0000

[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
From: Fumitoshi UKAI  <ukai@debian.or.jp>

Diffstat:
MChangeLog | 11+++++++++++
MNEWS | 3+++
Mfm.h | 4+++-
Mmain.c | 18++++++++++--------
Mrc.c | 2--
5 files changed, 27 insertions(+), 11 deletions(-)

diff --git 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. diff --git 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 @@ -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 @@ -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 @@ -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},