projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unset PAGER in test/common.sh so that make distcheck passes.
[mmh]
/
sbr
/
seq_save.c
diff --git
a/sbr/seq_save.c
b/sbr/seq_save.c
index
e0f42ae
..
4055f9d
100644
(file)
--- a/
sbr/seq_save.c
+++ b/
sbr/seq_save.c
@@
-3,7
+3,9
@@
* seq_save.c -- 1) synchronize sequences
* -- 2) save public sequences
*
* seq_save.c -- 1) synchronize sequences
* -- 2) save public sequences
*
- * $Id$
+ * This code is Copyright (c) 2002, by the authors of nmh. See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
*/
#include <h/mh.h>
*/
#include <h/mh.h>
@@
-27,10
+29,6
@@
seq_save (struct msgs *mp)
FILE *fp;
sigset_t set, oset;
FILE *fp;
sigset_t set, oset;
- /* sanity check - check that context has been read */
- if (defpath == NULL)
- adios (NULL, "oops, context hasn't been read yet");
-
/* check if sequence information has changed */
if (!(mp->msgflags & SEQMOD))
return;
/* check if sequence information has changed */
if (!(mp->msgflags & SEQMOD))
return;
@@
-76,9
+74,9
@@
priv:
* If that fails (probably because folder is
* readonly), then make sequence private.
*/
* If that fails (probably because folder is
* readonly), then make sequence private.
*/
- if ((fp = fopen (seqfile, "w")) == NULL
+ if ((fp = lkfopen (seqfile, "w")) == NULL
&& (unlink (seqfile) == -1 ||
&& (unlink (seqfile) == -1 ||
- (fp = fopen (seqfile, "w")) == NULL)) {
+ (fp = lkfopen (seqfile, "w")) == NULL)) {
admonish (attr, "unable to write");
goto priv;
}
admonish (attr, "unable to write");
goto priv;
}
@@
-89,15
+87,15
@@
priv:
sigaddset(&set, SIGINT);
sigaddset(&set, SIGQUIT);
sigaddset(&set, SIGTERM);
sigaddset(&set, SIGINT);
sigaddset(&set, SIGQUIT);
sigaddset(&set, SIGTERM);
- SIGPROCMASK (SIG_BLOCK, &set, &oset);
+ sigprocmask (SIG_BLOCK, &set, &oset);
}
fprintf (fp, "%s: %s\n", mp->msgattrs[i], cp);
}
}
if (fp) {
}
fprintf (fp, "%s: %s\n", mp->msgattrs[i], cp);
}
}
if (fp) {
- fclose (fp);
- SIGPROCMASK (SIG_SETMASK, &oset, &set); /* reset signal mask */
+ lkfclose (fp, seqfile);
+ sigprocmask (SIG_SETMASK, &oset, &set); /* reset signal mask */
} else {
/*
* If folder is not readonly, and we didn't save any
} else {
/*
* If folder is not readonly, and we didn't save any