X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fforw.c;h=fe056f4a67152a6fb981d5f664e823cae6c2dc00;hb=68a686adeb39223a5e1ad35e4a24890ec053679d;hp=e79e39584ccf637831c76702ec3da8b2a3e8a2aa;hpb=aed384169af5204b8002d06e7a22f89197963d2d;p=mmh diff --git a/uip/forw.c b/uip/forw.c index e79e395..fe056f4 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -23,23 +23,19 @@ 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 +#define VERSIONSW 8 { "version", 0 }, -#define HELPSW 11 +#define HELPSW 9 { "help", 0 }, #ifdef MHE @@ -66,7 +62,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; @@ -118,10 +114,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,15 +121,12 @@ 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++; continue; +#endif /* MHE */ case FORMSW: if (!(form = *argp++) || *form == '-') @@ -226,11 +215,12 @@ main(int argc, char **argv) issue = 0; issue++; } - if (volume == 0) + if (volume == 0) { snprintf(buf, sizeof(buf), VFORMAT, digest); - if ((cp = context_find(buf)) == NULL || - (volume = atoi(cp)) <= 0) - volume = 1; + if ((cp = context_find(buf)) == NULL || + (volume = atoi(cp)) <= 0) + volume = 1; + } if (!form) form = digestcomps; in = build_form(form, digest, volume, issue); @@ -238,7 +228,7 @@ main(int argc, char **argv) close(in); } else { fmtstr = new_fs(form, forwcomps); - if (write(out, fmtstr, strlen(fmtstr)) != strlen(fmtstr)) { + if (write(out, fmtstr, strlen(fmtstr)) != (int)strlen(fmtstr)) { adios(drft, "error writing"); } } @@ -260,9 +250,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; @@ -325,7 +315,7 @@ build_form(char *form, char *digest, int volume, int issue) cptr->c_text = digest; FINDCOMP(cptr, "date"); if (cptr) - cptr->c_text = getcpy(dtimenow(0)); + cptr->c_text = getcpy(dtimenow()); dat[0] = issue; dat[1] = volume;