From: markus schnalke Date: Thu, 9 Feb 2012 14:47:14 +0000 (+0100) Subject: Removed the -fcc switch from repl(1). X-Git-Tag: mmh-thesis-end~340 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=88d0e7601d67f8212791482433dcda4cb9d3eaac;p=mmh Removed the -fcc switch from repl(1). None of comp, dist, forw has it, why should repl then have it? It likely had been added as the replcomps are not just copied but processed. It had been quite easy to add this feature but nobody went far enough to process components, distcomps, forwcomps as well to be able to have such an -fcc switch for those tools as well. --- diff --git a/docs/COMPLETION-BASH b/docs/COMPLETION-BASH index 918e285..bc3ac32 100644 --- a/docs/COMPLETION-BASH +++ b/docs/COMPLETION-BASH @@ -96,7 +96,7 @@ _nmh() repl ) options=(-annotate -noannotate -group -nogroup -cc -nocc -query -noquery -form -format -noformat -filter - -mime -nomime -fcc -width + -mime -nomime -width -editor -noedit -whatnowproc -nowhatnowproc -build -file -version -help) ;; diff --git a/docs/COMPLETION-ZSH b/docs/COMPLETION-ZSH index 86ee4b4..16e3e0d 100644 --- a/docs/COMPLETION-ZSH +++ b/docs/COMPLETION-ZSH @@ -129,7 +129,7 @@ compctl -K mhfseq -x 's[+][@],c[-1] s[+][@]' \ compctl -K mhfseq -x 's[+][@]' \ -K mhcomp -S / -q - 'c[-1]' -K mhfseq -\ 's[-]' -k "(annotate noannotate cc nocc \ - editor noedit fcc filter form group nogroup \ + editor noedit filter form group nogroup \ query noquery width whatnowproc nowhatnowproc help)" - 'c[-1,(cc|nocc)]' \ -k "(all to cc me)" - 'C[-1,-(filter|form)]' -K mhfile - \ 'C[-1,-(editor|whatnowproc)]' -c -- repl diff --git a/etc/replcomps b/etc/replcomps index 2520c8e..3b94380 100644 --- a/etc/replcomps +++ b/etc/replcomps @@ -19,7 +19,7 @@ %(formataddr{prev-resent-cc})\ %(formataddr(me))\ %(void(width))%(putaddr Cc: ) -Fcc: %<{fcc}%{fcc}%|+sent%> +Fcc: +sent Subject: %<{subject}Re: %(void{subject})%(trim)%(putstr)%> %; %; Make References: and In-reply-to: fields for threading. diff --git a/etc/replgroupcomps b/etc/replgroupcomps index ff09c06..789633f 100644 --- a/etc/replgroupcomps +++ b/etc/replgroupcomps @@ -28,7 +28,7 @@ %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\ %<(nonnull)%(void(width))%(putaddr Cc: )\n%>%>\ %; -Fcc: %<{fcc}%{fcc}%|+sent%> +Fcc: +sent Subject: %<{subject}Re: %(void{subject})%(trim)%(putstr)%> %; %; Make References: and In-reply-to: fields for threading. diff --git a/h/prototypes.h b/h/prototypes.h index d9b105b..26b2107 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -142,8 +142,7 @@ int annotate(char *, char *, char *, int, int, int); void annolist(char *, char *, char *, int); void annopreserve(int); int distout(char *, char *, char *); -void replout(FILE *, char *, char *, struct msgs *, int, - char *, char *, char *); +void replout(FILE *, char *, char *, struct msgs *, int, char *, char *); int what_now(char *, int, int, char *, char *, int, struct msgs *, char *, char *); diff --git a/man/mh-chart.man1 b/man/mh-chart.man1 index 7412f55..d043d92 100644 --- a/man/mh-chart.man1 +++ b/man/mh-chart.man1 @@ -540,8 +540,6 @@ all/to/cc/me] .RB [ \-filter .IR filterfile ] .RB [ \-mime " | " \-nomime ] -.RB [ \-fcc -.IR +folder ] .RB [ \-editor .IR editor ] .RB [ \-noedit ] diff --git a/man/mh-format.man5 b/man/mh-format.man5 index ee59f71..dccedad 100644 --- a/man/mh-format.man5 +++ b/man/mh-format.man5 @@ -517,22 +517,6 @@ leading label of \*(lqCc:\*(rq. .PP .RS 5 .nf -%<{fcc}Fcc: %{fcc}\\n%>\\ -.fi -.RE -.PP -If a -.B \-fcc -.I folder -switch was given to -.B repl -(see -.BR repl (1) -for more details about %{\fIfcc\fR\^}), -an \*(lqFcc:\*(rq header is output. -.PP -.RS 5 -.nf %<{subject}Subject: Re: %{subject}\\n%>\\ .fi .RE diff --git a/man/repl.man1 b/man/repl.man1 index 05a9736..c3178bb 100644 --- a/man/repl.man1 +++ b/man/repl.man1 @@ -23,8 +23,6 @@ all/to/cc/me] .RB [ \-filter .IR filterfile ] .RB [ \-mime " | " \-nomime ] -.RB [ \-fcc -.IR +folder ] .RB [ \-editor .IR editor ] .RB [ \-noedit ] @@ -76,7 +74,7 @@ to construct the reply message draft as follows: .nf To: or or Cc: and and -Fcc: {fcc switch} or +sent +Fcc: +sent Subject: Re: In\-Reply\-To: References: @@ -304,33 +302,9 @@ may be used to re\-edit and send the constructed message, but the annotations won't take place. Annotations are always done inplace in order to preserve any links to the message. .PP -Although the default template specifies that a copy of the reply will be +The default template specifies that a copy of the reply will be put in -the folder 'sent', -if the -.B \-fcc -.I +folder -switch is given it will override the default value. -More than one folder, each preceded by -.B \-fcc -can -be named. -.PP -In addition to the standard -.BR mh\-format (5) -escapes, -.B repl -also recognizes the following additional -.I component -escape: -.PP -.RS 5 -.nf -.ta \w'Escape 'u +\w'Returns 'u -.I Escape Returns Description -fcc string Any folders specified with `\-fcc\ folder' -.fi -.RE +the folder 'sent'. .PP To avoid reiteration, .B repl diff --git a/uip/repl.c b/uip/repl.c index 354bb79..a21b0df 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -27,37 +27,35 @@ static struct swit switches[] = { { "editor editor", 0 }, #define NEDITSW 7 { "noedit", 0 }, -#define FCCSW 8 - { "fcc folder", 0 }, -#define FILTSW 9 +#define FILTSW 8 { "filter filterfile", 0 }, -#define FORMSW 10 +#define FORMSW 9 { "form formfile", 0 }, -#define FRMTSW 11 +#define FRMTSW 10 { "format", 5 }, -#define NFRMTSW 12 +#define NFRMTSW 11 { "noformat", 7 }, -#define MIMESW 13 +#define MIMESW 12 { "mime", 0 }, -#define NMIMESW 14 +#define NMIMESW 13 { "nomime", 0 }, -#define QURYSW 15 +#define QURYSW 14 { "query", 0 }, -#define NQURYSW 16 +#define NQURYSW 15 { "noquery", 0 }, -#define WHATSW 17 +#define WHATSW 16 { "whatnowproc program", 0 }, -#define NWHATSW 18 +#define NWHATSW 17 { "nowhatnowproc", 0 }, -#define VERSIONSW 19 +#define VERSIONSW 18 { "version", 0 }, -#define HELPSW 20 +#define HELPSW 19 { "help", 0 }, -#define FILESW 21 +#define FILESW 20 { "file file", 4 }, /* interface from msh */ #ifdef MHE -#define BILDSW 22 +#define BILDSW 21 { "build", 5 }, /* interface from mhe */ #endif @@ -86,7 +84,6 @@ short groupreply = 0; /* Is this a group reply? */ int mime = 0; /* include original as MIME part */ char *form = NULL; /* form (components) file */ char *filter = NULL; /* message filter file */ -char *fcc = NULL; /* folders to add to Fcc: header */ /* @@ -100,7 +97,7 @@ main(int argc, char **argv) { int anot = 0; int nedit = 0, nwhat = 0; - char *cp, *cwd, *dp, *maildir, *file = NULL; + char *cp, *cwd, *maildir, *file = NULL; char *folder = NULL, *msg = NULL; char *ed = NULL, drft[BUFSIZ], buf[BUFSIZ]; char **argp, **arguments; @@ -191,20 +188,6 @@ main(int argc, char **argv) nwhat++; continue; - case FCCSW: - if (!(cp = *argp++) || *cp == '-') - adios(NULL, "missing argument to %s", - argp[-2]); - dp = NULL; - if (*cp == '@') - cp = dp = getcpy(expandfol(cp)); - if (fcc) - fcc = add(", ", fcc); - fcc = add(cp, fcc); - if (dp) - free(dp); - continue; - case FILESW: if (file) adios(NULL, "only one file at a time!"); @@ -336,7 +319,7 @@ main(int argc, char **argv) form = etcpath(replcomps); } - replout(in, msg, drft, mp, mime, form, filter, fcc); + replout(in, msg, drft, mp, mime, form, filter); fclose(in); if (nwhat) diff --git a/uip/replsbr.c b/uip/replsbr.c index fbf31c7..852becd 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -67,7 +67,7 @@ static void replfilter(FILE *, FILE *, char *); void replout(FILE *inb, char *msg, char *drft, struct msgs *mp, - int mime, char *form, char *filter, char *fcc) + int mime, char *form, char *filter) { register int state, i; register struct comp *cptr; @@ -127,12 +127,6 @@ replout(FILE *inb, char *msg, char *drft, struct msgs *mp, if (cptr) cptr->c_name = ""; } - /* set up the "fcc" pseudo-component */ - if (fcc) { - FINDCOMP(cptr, "fcc"); - if (cptr) - cptr->c_text = getcpy(fcc); - } if ((cp = getenv("USER"))) { FINDCOMP(cptr, "user"); if (cptr)