X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Frepl.c;h=cc8a86b9bda2e7e1ba9d27e413c12e47102bab2c;hb=587e977a97865f091131355f6dd250ece99f7adb;hp=97178b1f42427cc56733a72d827874e7e56942ce;hpb=46d843745041d6e852be2ae57de9261ae4e5f399;p=mmh diff --git a/uip/repl.c b/uip/repl.c index 97178b1..cc8a86b 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -74,6 +74,10 @@ static struct swit switches[] = { { "atfile", 0 }, #define NOATFILESW 30 { "noatfile", 0 }, +#define FMTPROCSW 31 + { "fmtproc program", 0 }, +#define NFMTPROCSW 32 + { "nofmtproc", 0 }, { NULL, 0 } }; @@ -138,7 +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 atfile = 0; + 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]; @@ -176,7 +181,7 @@ main (int argc, char **argv) done (0); case VERSIONSW: print_version(invo_name); - done (1); + done (0); case GROUPSW: groupreply++; @@ -316,6 +321,15 @@ main (int argc, char **argv) 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 == '@') { @@ -431,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, atfile ? msg : NULL, 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; }