projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed -nowhatnowproc switch as it does nothing useful.
[mmh]
/
uip
/
forw.c
diff --git
a/uip/forw.c
b/uip/forw.c
index
e79e395
..
4fbd45f
100644
(file)
--- a/
uip/forw.c
+++ b/
uip/forw.c
@@
-35,11
+35,9
@@
static struct swit switches[] = {
{ "volume number", 0 },
#define WHATSW 8
{ "whatnowproc program", 0 },
{ "volume number", 0 },
#define WHATSW 8
{ "whatnowproc program", 0 },
-#define NWHATSW 9
- { "nowhatnowproc", 0 },
-#define VERSIONSW 10
+#define VERSIONSW 9
{ "version", 0 },
{ "version", 0 },
-#define HELPSW 11
+#define HELPSW 10
{ "help", 0 },
#ifdef MHE
{ "help", 0 },
#ifdef MHE
@@
-66,7
+64,7
@@
main(int argc, char **argv)
{
int msgp = 0, anot = 0;
int issue = 0, volume = 0;
{
int msgp = 0, anot = 0;
int issue = 0, volume = 0;
- int nedit = 0, nwhat = 0, in;
+ int nedit = 0, in;
int out, msgnum;
char *cp, *cwd, *maildir;
char *digest = NULL, *ed = NULL;
int out, msgnum;
char *cp, *cwd, *maildir;
char *digest = NULL, *ed = NULL;
@@
-129,15
+127,12
@@
main(int argc, char **argv)
*whatnowproc == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
*whatnowproc == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
- nwhat = 0;
continue;
#ifdef MHE
case BILDSW:
buildsw++; /* fall... */
continue;
#ifdef MHE
case BILDSW:
buildsw++; /* fall... */
-#endif /* MHE */
- case NWHATSW:
- nwhat++;
continue;
continue;
+#endif /* MHE */
case FORMSW:
if (!(form = *argp++) || *form == '-')
case FORMSW:
if (!(form = *argp++) || *form == '-')
@@
-226,11
+221,12
@@
main(int argc, char **argv)
issue = 0;
issue++;
}
issue = 0;
issue++;
}
- if (volume == 0)
+ if (volume == 0) {
snprintf(buf, sizeof(buf), VFORMAT, digest);
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);
if (!form)
form = digestcomps;
in = build_form(form, digest, volume, issue);
@@
-238,7
+234,7
@@
main(int argc, char **argv)
close(in);
} else {
fmtstr = new_fs(form, forwcomps);
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");
}
}
adios(drft, "error writing");
}
}
@@
-260,7
+256,7
@@
main(int argc, char **argv)
seq_save(mp); /* synchronize sequences */
context_save(); /* save the context file */
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,
anot ? "Forwarded" : NULL, cwd);
done(0);
what_now(ed, nedit, NOUSE, drft, NULL, 0, mp,
anot ? "Forwarded" : NULL, cwd);
@@
-325,7
+321,7
@@
build_form(char *form, char *digest, int volume, int issue)
cptr->c_text = digest;
FINDCOMP(cptr, "date");
if (cptr)
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;
dat[0] = issue;
dat[1] = volume;