X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0a032eea07f6d77ac6ea4d5a39c9491c34358058..12e3e0754ce067f30b3cdf7378ddbbaadff1ec7c:/sbr/context_save.c diff --git a/sbr/context_save.c b/sbr/context_save.c index b9799ccd..2740321e 100644 --- a/sbr/context_save.c +++ b/sbr/context_save.c @@ -1,5 +1,4 @@ -/* - * context_save.c -- write out the updated context file +/* context_save.c -- write out the updated context file * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -12,8 +11,11 @@ * because there no longer are setuid/setgid programs in nmh. */ -#include -#include +#include "h/mh.h" +#include "context_save.h" +#include "error.h" +#include "h/signals.h" +#include "lock_file.h" void context_save (void) @@ -40,11 +42,9 @@ context_save (void) sigprocmask (SIG_BLOCK, &set, &oset); if (!(out = lkfopendata (ctxpath, "w", &failed_to_lock))) { - if (failed_to_lock) { + if (failed_to_lock) adios (ctxpath, "failed to lock"); - } else { - adios (ctxpath, "unable to write"); - } + adios (ctxpath, "unable to write"); } for (np = m_defs; np; np = np->n_next) if (np->n_context)