projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove h/nmh.h
[mmh]
/
uip
/
pick.c
diff --git
a/uip/pick.c
b/uip/pick.c
index
7c42b42
..
d31f9b8
100644
(file)
--- a/
uip/pick.c
+++ b/
uip/pick.c
@@
-76,7
+76,7
@@
static int pmatches(FILE *, int, long, long);
static int listsw = -1;
static int listsw = -1;
-static void putzero_done();
+void putzero_done();
int
main(int argc, char **argv)
int
main(int argc, char **argv)
@@
-91,7
+91,9
@@
main(int argc, char **argv)
struct msgs *mp;
register FILE *fp;
struct msgs *mp;
register FILE *fp;
- atexit(putzero_done);
+ if (atexit(putzero_done) != 0) {
+ adios(NULL, "atexit failed");
+ }
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
setlocale(LC_ALL, "");
invo_name = mhbasename(argv[0]);
@@
-163,8
+165,7
@@
main(int argc, char **argv)
adios(NULL, "too many sequences (more than %d) specified", NUMATTRS);
if (!seq_nameok(cp))
adios(NULL, "too many sequences (more than %d) specified", NUMATTRS);
if (!seq_nameok(cp))
- /* sysexits.h EX_USAGE */
- exit(1);
+ exit(1);
seqs[seqp++] = cp;
continue;
seqs[seqp++] = cp;
continue;
@@
-239,7
+240,6
@@
main(int argc, char **argv)
folder);
if (!pcompile(vec, NULL))
folder);
if (!pcompile(vec, NULL))
- /* sysexits.h EX_USAGE */
exit(1);
lo = mp->lowsel;
exit(1);
lo = mp->lowsel;
@@
-291,7
+291,6
@@
main(int argc, char **argv)
*/
for (seqp = 0; seqs[seqp]; seqp++)
if (!seq_addsel(mp, seqs[seqp], publicsw, zerosw))
*/
for (seqp = 0; seqs[seqp]; seqp++)
if (!seq_addsel(mp, seqs[seqp], publicsw, zerosw))
- /* sysexits.h EX_IOERR */
exit(1);
/*
exit(1);
/*
@@
-305,16
+304,16
@@
main(int argc, char **argv)
seq_save(mp); /* synchronize message sequences */
context_save(); /* save the context file */
folder_free(mp); /* free folder/message structure */
seq_save(mp); /* synchronize message sequences */
context_save(); /* save the context file */
folder_free(mp); /* free folder/message structure */
+ listsw = 0; /* HACK */
return 0;
}
return 0;
}
-static void
+void
putzero_done()
{
putzero_done()
{
- if (listsw && !isatty(fileno(stdout))) {
+ if (listsw && !isatty(fileno(stdout)))
printf("0\n");
printf("0\n");
- }
}
}