Removed the -fcc switch from repl(1).
authormarkus schnalke <meillo@marmaro.de>
Thu, 9 Feb 2012 14:47:14 +0000 (15:47 +0100)
committermarkus schnalke <meillo@marmaro.de>
Thu, 9 Feb 2012 14:47:14 +0000 (15:47 +0100)
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.

docs/COMPLETION-BASH
docs/COMPLETION-ZSH
etc/replcomps
etc/replgroupcomps
h/prototypes.h
man/mh-chart.man1
man/mh-format.man5
man/repl.man1
uip/repl.c
uip/replsbr.c

index 918e285..bc3ac32 100644 (file)
@@ -96,7 +96,7 @@ _nmh()
         repl )
             options=(-annotate -noannotate -group -nogroup -cc
                     -nocc -query -noquery -form -format -noformat -filter
         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)
             ;;
                     -editor -noedit -whatnowproc
                     -nowhatnowproc -build -file -version -help)
             ;;
index 86ee4b4..16e3e0d 100644 (file)
@@ -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 \
 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
   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
index 2520c8e..3b94380 100644 (file)
@@ -19,7 +19,7 @@
 %(formataddr{prev-resent-cc})\
 %(formataddr(me))\
 %(void(width))%(putaddr Cc: )
 %(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.
 Subject: %<{subject}Re: %(void{subject})%(trim)%(putstr)%>
 %;
 %; Make References: and In-reply-to: fields for threading.
index ff09c06..789633f 100644 (file)
@@ -28,7 +28,7 @@
 %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
 %<(nonnull)%(void(width))%(putaddr Cc: )\n%>%>\
 %;
 %(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.
 Subject: %<{subject}Re: %(void{subject})%(trim)%(putstr)%>
 %;
 %; Make References: and In-reply-to: fields for threading.
index d9b105b..26b2107 100644 (file)
@@ -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 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 *);
 
 int what_now(char *, int, int, char *, char *, int, struct msgs *,
                char *, char *);
 
index 7412f55..d043d92 100644 (file)
@@ -540,8 +540,6 @@ all/to/cc/me]
 .RB [ \-filter
 .IR filterfile ]
 .RB [ \-mime " | " \-nomime ]
 .RB [ \-filter
 .IR filterfile ]
 .RB [ \-mime " | " \-nomime ]
-.RB [ \-fcc
-.IR +folder ]
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
index ee59f71..dccedad 100644 (file)
@@ -517,22 +517,6 @@ leading label of \*(lqCc:\*(rq.
 .PP
 .RS 5
 .nf
 .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
 %<{subject}Subject: Re: %{subject}\\n%>\\
 .fi
 .RE
index 05a9736..c3178bb 100644 (file)
@@ -23,8 +23,6 @@ all/to/cc/me]
 .RB [ \-filter
 .IR filterfile ]
 .RB [ \-mime " | " \-nomime ]
 .RB [ \-filter
 .IR filterfile ]
 .RB [ \-mime " | " \-nomime ]
-.RB [ \-fcc
-.IR +folder ]
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
@@ -76,7 +74,7 @@ to construct the reply message draft as follows:
 .nf
 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
 Cc: <To> and <Cc> and <personal address>
 .nf
 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
 Cc: <To> and <Cc> and <personal address>
-Fcc: {fcc switch} or +sent
+Fcc: +sent
 Subject: Re: <Subject>
 In\-Reply\-To: <Message\-Id>
 References: <Message\-Id>
 Subject: Re: <Subject>
 In\-Reply\-To: <Message\-Id>
 References: <Message\-Id>
@@ -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
 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
 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
 .PP
 To avoid reiteration,
 .B repl
index 354bb79..a21b0df 100644 (file)
@@ -27,37 +27,35 @@ static struct swit switches[] = {
        { "editor editor", 0 },
 #define NEDITSW  7
        { "noedit", 0 },
        { "editor editor", 0 },
 #define NEDITSW  7
        { "noedit", 0 },
-#define FCCSW  8
-       { "fcc folder", 0 },
-#define FILTSW  9
+#define FILTSW  8
        { "filter filterfile", 0 },
        { "filter filterfile", 0 },
-#define FORMSW  10
+#define FORMSW  9
        { "form formfile", 0 },
        { "form formfile", 0 },
-#define FRMTSW  11
+#define FRMTSW  10
        { "format", 5 },
        { "format", 5 },
-#define NFRMTSW  12
+#define NFRMTSW  11
        { "noformat", 7 },
        { "noformat", 7 },
-#define MIMESW  13
+#define MIMESW  12
        { "mime", 0 },
        { "mime", 0 },
-#define NMIMESW  14
+#define NMIMESW  13
        { "nomime", 0 },
        { "nomime", 0 },
-#define QURYSW  15
+#define QURYSW  14
        { "query", 0 },
        { "query", 0 },
-#define NQURYSW  16
+#define NQURYSW  15
        { "noquery", 0 },
        { "noquery", 0 },
-#define WHATSW  17
+#define WHATSW  16
        { "whatnowproc program", 0 },
        { "whatnowproc program", 0 },
-#define NWHATSW  18
+#define NWHATSW  17
        { "nowhatnowproc", 0 },
        { "nowhatnowproc", 0 },
-#define VERSIONSW  19
+#define VERSIONSW  18
        { "version", 0 },
        { "version", 0 },
-#define HELPSW  20
+#define HELPSW  19
        { "help", 0 },
        { "help", 0 },
-#define FILESW  21
+#define FILESW  20
        { "file file", 4 },  /* interface from msh */
 
 #ifdef MHE
        { "file file", 4 },  /* interface from msh */
 
 #ifdef MHE
-#define BILDSW  22
+#define BILDSW  21
        { "build", 5 },  /* interface from mhe */
 #endif
 
        { "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 */
 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;
 {
        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;
        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;
 
                                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!");
                        case FILESW:
                                if (file)
                                        adios(NULL, "only one file at a time!");
@@ -336,7 +319,7 @@ main(int argc, char **argv)
                        form = etcpath(replcomps);
        }
 
                        form = etcpath(replcomps);
        }
 
-       replout(in, msg, drft, mp, mime, form, filter, fcc);
+       replout(in, msg, drft, mp, mime, form, filter);
        fclose(in);
 
        if (nwhat)
        fclose(in);
 
        if (nwhat)
index fbf31c7..852becd 100644 (file)
@@ -67,7 +67,7 @@ static void replfilter(FILE *, FILE *, char *);
 
 void
 replout(FILE *inb, char *msg, char *drft, struct msgs *mp,
 
 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;
 {
        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 = "";
        }
                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)
        if ((cp = getenv("USER"))) {
                FINDCOMP(cptr, "user");
                if (cptr)