From dfa0332c4e6144699dedd5c9795219adc0f9c0d2 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 22 Mar 2012 13:18:23 +0100 Subject: [PATCH] Removed the mhlproc profile entry. Call mhl directly. --- config/config.c | 10 ---------- etc/mhl.headers | 2 +- h/mh.h | 1 - man/forw.man1 | 1 - man/mh-profile.man5 | 18 ------------------ man/mhparam.man1 | 4 ++-- man/mhshow.man1 | 7 ++----- man/repl.man1 | 1 - sbr/readconfig.c | 1 - uip/mhparam.c | 1 - uip/mhshowsbr.c | 9 ++++----- uip/repl.c | 14 ++++---------- 12 files changed, 13 insertions(+), 56 deletions(-) diff --git a/config/config.c b/config/config.c index e650b0d..f0187ad 100644 --- a/config/config.c +++ b/config/config.c @@ -164,16 +164,6 @@ char *rmmproc = NULL; char *sendproc = NMHBINDIR"/send"; /* -** This is the program (mhl) used to filter messages. It is -** used by mhshow to filter and display the message headers of -** MIME messages. It is used by repl (with -filter) -** to filter the message to which you are replying. -** It is used by send/spost (with -filter) to filter the message -** for "Bcc:" recipients. -*/ -char *mhlproc = NMHBINDIR"/mhl"; - -/* ** This program is called after comp, et. al., have built a draft */ char *whatnowproc = NMHBINDIR"/whatnow"; diff --git a/etc/mhl.headers b/etc/mhl.headers index 995dbf5..9bd6ed9 100644 --- a/etc/mhl.headers +++ b/etc/mhl.headers @@ -1,7 +1,7 @@ ; mhl.headers ; ; Default format file for displaying headers in -; MIME messages. mhshow calls the mhlproc with this +; MIME messages. mhshow calls mhl with this ; filter to display message header. ; overflowtext="***",overflowoffset=5 diff --git a/h/mh.h b/h/mh.h index 44363b6..5ebda8e 100644 --- a/h/mh.h +++ b/h/mh.h @@ -307,7 +307,6 @@ extern char *mailproc; extern char *mailspool; extern char *mh_seq; extern char *mhlformat; -extern char *mhlproc; extern char *mhlreply; extern char *mimetypequery; extern char *mimetypequeryproc; diff --git a/man/forw.man1 b/man/forw.man1 index 026b2cf..0d5cd40 100644 --- a/man/forw.man1 +++ b/man/forw.man1 @@ -196,7 +196,6 @@ User's Manual for more information on making digests. ^Editor:~^To override the default editor ^Msg\-Protect:~^To set mode when creating a new message (draft) ^fileproc:~^Program to refile the message -^mhlproc:~^Program to filter messages being forwarded ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions .fi diff --git a/man/mh-profile.man5 b/man/mh-profile.man5 index d3e6e31..773dc8a 100644 --- a/man/mh-profile.man5 +++ b/man/mh-profile.man5 @@ -441,24 +441,6 @@ It is used to retrieve an external-body with access-type `mail-server' .BR mhstore ). .RE .PP -.BR mhlproc : -%bindir%/mhl -.RS 5 -This is the program used to filter messages in various ways. It -is used by -.B mhshow -to filter and display the message headers -of MIME messages. -Unless the -.B \-nofilter -option is used with -.BR repl , -the -.I mhlproc -is used to filter the -message to which you are replying. -.RE -.PP .BR postproc : %bindir%/post .RS 5 diff --git a/man/mhparam.man1 b/man/mhparam.man1 index af9f630..ce62a52 100644 --- a/man/mhparam.man1 +++ b/man/mhparam.man1 @@ -55,8 +55,8 @@ Examples: % mhparam path Mail -% mhparam mhlproc -mhl +% mhparam editor +vi % mhparam \-component path Path: Mail diff --git a/man/mhshow.man1 b/man/mhshow.man1 index 5c49255..a3330c0 100644 --- a/man/mhshow.man1 +++ b/man/mhshow.man1 @@ -139,10 +139,8 @@ Content-MD5 header field), then will attempt to verify the integrity of the content. .SS "Showing the Contents" -The headers of each message are displayed with the -.I mhlproc -(usually -.BR mhl ), +The headers of each message are displayed with +.B mhl using the standard format file .IR mhl.headers . You may specify an alternate format file with the @@ -562,7 +560,6 @@ installation. ^Path:~^To determine the user's mail storage ^Current\-Folder:~^To find the default current folder ^Unseen\-Sequence:~^To name sequences denoting unseen messages -^mhlproc:~^Default program to display message headers ^nmh-access-ftp:~^Program to retrieve contents via FTP ^nmh-cache~^Public directory to store cached external contents ^nmh-private-cache~^Personal directory to store cached external contents diff --git a/man/repl.man1 b/man/repl.man1 index 0b4be2f..5643286 100644 --- a/man/repl.man1 +++ b/man/repl.man1 @@ -391,7 +391,6 @@ switch. ^Editor:~^To override the default editor ^Msg\-Protect:~^To set mode when creating a new message (draft) ^fileproc:~^Program to refile the message -^mhlproc:~^Program to filter message being replied\-to ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions .fi diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 16659a9..71fff7a 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -25,7 +25,6 @@ static struct procstr procs[] = { { "fileproc", &fileproc }, { "listproc", &listproc }, { "mailproc", &mailproc }, - { "mhlproc", &mhlproc }, { "postproc", &postproc }, { "rmmproc", &rmmproc }, { "sendmail", &sendmail }, diff --git a/uip/mhparam.c b/uip/mhparam.c index 4cad041..7c43669 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -41,7 +41,6 @@ static struct proc procs [] = { { "foldprot", &foldprot }, { "listproc", &listproc }, { "mailproc", &mailproc }, - { "mhlproc", &mhlproc }, { "mimetypequeryproc", &mimetypequeryproc }, { "msgprot", &msgprot }, { "pager", &defaultpager }, diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 6dae3e8..9f69c54 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -174,9 +174,8 @@ show_single_message(CT ct, char *form) /* -** Use the mhlproc to show the header fields +** Use mhl to show the header fields */ - static void DisplayMsgHeader(CT ct, char *form) { @@ -185,7 +184,7 @@ DisplayMsgHeader(CT ct, char *form) char *vec[8]; vecp = 0; - vec[vecp++] = mhbasename(mhlproc); + vec[vecp++] = "mhl"; vec[vecp++] = "-form"; vec[vecp++] = form; vec[vecp++] = "-nobody"; @@ -200,9 +199,9 @@ DisplayMsgHeader(CT ct, char *form) /* NOTREACHED */ case OK: - execvp(mhlproc, vec); + execvp("mhl", vec); fprintf(stderr, "unable to exec "); - perror(mhlproc); + perror("mhl"); _exit(-1); /* NOTREACHED */ diff --git a/uip/repl.c b/uip/repl.c index 1a0e143..dff8a9e 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -755,16 +755,14 @@ insert(struct mailname *np) /* -** Call the mhlproc +** Call mhl ** ** This function expects that argument out has been fflushed by the caller. */ - static void replfilter(FILE *in, FILE *out, char *filter) { int pid; - char *mhl; char *errstr; if (filter == NULL) @@ -773,8 +771,6 @@ replfilter(FILE *in, FILE *out, char *filter) if (access(filter, R_OK) == NOTOK) adios(filter, "unable to read"); - mhl = mhbasename(mhlproc); - rewind(in); lseek(fileno(in), (off_t) 0, SEEK_SET); @@ -787,17 +783,15 @@ replfilter(FILE *in, FILE *out, char *filter) dup2(fileno(out), fileno(stdout)); closefds(3); - execlp(mhlproc, mhl, "-form", filter, NULL); + execlp("mhl", "mhl", "-form", filter, NULL); errstr = strerror(errno); - write(2, "unable to exec ", 15); - write(2, mhlproc, strlen(mhlproc)); - write(2, ": ", 2); + write(2, "unable to exec mhl: ", 20); write(2, errstr, strlen(errstr)); write(2, "\n", 1); _exit(-1); default: - if (pidXwait(pid, mhl)) + if (pidXwait(pid, "mhl")) done(1); fseek(out, 0L, SEEK_END); break; -- 1.7.10.4