* -- 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>
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;
* 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 ||
- (fp = fopen (seqfile, "w")) == NULL)) {
+ (fp = lkfopen (seqfile, "w")) == NULL)) {
admonish (attr, "unable to write");
goto priv;
}
}
if (fp) {
- fclose (fp);
+ lkfclose (fp, seqfile);
SIGPROCMASK (SIG_SETMASK, &oset, &set); /* reset signal mask */
} else {
/*