X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fforw.c;h=b1148b0946ab31999c0d8a503e3b1c182dd4e3b8;hp=140136a9abf8651d17786b96e6d76c886f02063a;hb=32b2354dbaf4bf934936eb5b102a4a3d2fdd209a;hpb=8051c625ea98a42e6f8f0b4276babeeae49b339f diff --git a/uip/forw.c b/uip/forw.c index 140136a..b1148b0 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -23,30 +23,22 @@ static struct swit switches[] = { { "noannotate", 0 }, #define EDITRSW 2 { "editor editor", 0 }, -#define NEDITSW 3 - { "noedit", 0 }, -#define FORMSW 4 +#define FORMSW 3 { "form formfile", 0 }, -#define DGSTSW 5 +#define DGSTSW 4 { "digest list", 0 }, -#define ISSUESW 6 +#define ISSUESW 5 { "issue number", 0 }, -#define VOLUMSW 7 +#define VOLUMSW 6 { "volume number", 0 }, -#define WHATSW 8 +#define WHATSW 7 { "whatnowproc program", 0 }, -#define NWHATSW 9 - { "nowhatnowproc", 0 }, -#define VERSIONSW 10 - { "version", 0 }, -#define HELPSW 11 +#define VERSIONSW 8 + { "Version", 0 }, +#define HELPSW 9 { "help", 0 }, - -#ifdef MHE #define BILDSW 12 { "build", 5 }, /* interface from mhe */ -#endif /* MHE */ - { NULL, 0 } }; @@ -66,7 +58,7 @@ main(int argc, char **argv) { int msgp = 0, anot = 0; int issue = 0, volume = 0; - int nedit = 0, nwhat = 0, in; + int in; int out, msgnum; char *cp, *cwd, *maildir; char *digest = NULL, *ed = NULL; @@ -74,10 +66,7 @@ main(int argc, char **argv) char *form = NULL, buf[BUFSIZ], value[10]; char **argp, **arguments, *msgs[MAXARGS]; char *fmtstr; - -#ifdef MHE int buildsw = 0; -#endif /* MHE */ #ifdef LOCALE setlocale(LC_ALL, ""); @@ -118,10 +107,6 @@ main(int argc, char **argv) if (!(ed = *argp++) || *ed == '-') adios(NULL, "missing argument to %s", argp[-2]); - nedit = 0; - continue; - case NEDITSW: - nedit++; continue; case WHATSW: @@ -129,14 +114,10 @@ main(int argc, char **argv) *whatnowproc == '-') adios(NULL, "missing argument to %s", argp[-2]); - nwhat = 0; continue; -#ifdef MHE + case BILDSW: - buildsw++; /* fall... */ -#endif /* MHE */ - case NWHATSW: - nwhat++; + buildsw++; continue; case FORMSW: @@ -180,13 +161,14 @@ main(int argc, char **argv) } cwd = getcpy(pwd()); - -#ifdef MHE - strncpy(drft, buildsw ? toabsdir("draft") - : m_draft(seq_beyond), sizeof(drft)); -#else - strncpy(drft, m_draft(seq_beyond), sizeof(drft)); -#endif /* MHE */ + strncpy(drft, buildsw ? toabsdir("draft") : m_draft(seq_beyond), + sizeof(drft)); + /* + ** FIXME: (concerning MHE support (buildsw) only) + ** There's no check if the draft already exists. mmh has removed + ** this case by having the draft folder. I won't add code only to + ** handle this legacy issue for MHE. -- meillo@marmaro.de 2012-05 + */ /* ** Forwarding a message. @@ -261,9 +243,9 @@ main(int argc, char **argv) seq_save(mp); /* synchronize sequences */ context_save(); /* save the context file */ - if (nwhat) + if (buildsw) done(0); - what_now(ed, nedit, NOUSE, drft, NULL, 0, mp, + what_now(ed, NOUSE, drft, NULL, 0, mp, anot ? "Forwarded" : NULL, cwd); done(1); return 1;