X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/a395a8839181b9895fdd0cafdb40be35675ced48..2b63c01aa93210f7c6b812c135173812793c7176:/uip/repl.c diff --git a/uip/repl.c b/uip/repl.c index ab8042fe..07f25a89 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -70,6 +70,14 @@ static struct swit switches[] = { { "file file", 4 }, /* interface from msh */ #define BILDSW 28 { "build", 5 }, /* interface from mhe */ +#define ATFILESW 29 + { "atfile", 0 }, +#define NOATFILESW 30 + { "noatfile", 0 }, +#define FMTPROCSW 31 + { "fmtproc program", 0 }, +#define NFMTPROCSW 32 + { "nofmtproc", 0 }, { NULL, 0 } }; @@ -134,6 +142,8 @@ main (int argc, char **argv) int i, isdf = 0; int anot = 0, inplace = 1; int nedit = 0, nwhat = 0; + int atfile = 1; + int fmtproc = -1; char *cp, *cwd, *dp, *maildir, *file = NULL; char *folder = NULL, *msg = NULL, *dfolder = NULL; char *dmsg = NULL, *ed = NULL, drft[BUFSIZ], buf[BUFSIZ]; @@ -304,6 +314,22 @@ main (int argc, char **argv) dfolder = NULL; isdf = NOTOK; continue; + + case ATFILESW: + atfile++; + continue; + case NOATFILESW: + atfile = 0; + continue; + + case FMTPROCSW: + if (!(formatproc = *argp++) || *formatproc == '-') + adios (NULL, "missing argument to %s", argp[-2]); + fmtproc = 1; + continue; + case NFMTPROCSW: + fmtproc = 0; + continue; } } if (*cp == '+' || *cp == '@') { @@ -419,13 +445,14 @@ try_it_again: form = etcpath (replcomps); } - replout (in, msg, drft, mp, outputlinelen, mime, form, filter, fcc); + replout (in, msg, drft, mp, outputlinelen, mime, form, filter, + fcc, fmtproc); fclose (in); if (nwhat) done (0); - what_now (ed, nedit, NOUSE, drft, msg, 0, mp, - anot ? "Replied" : NULL, inplace, cwd); + what_now (ed, nedit, NOUSE, drft, msg, 0, mp, anot ? "Replied" : NULL, + inplace, cwd, atfile); done (1); return 1; }