X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0a032eea07f6d77ac6ea4d5a39c9491c34358058..ec173fd2c:/sbr/folder_delmsgs.c?ds=sidebyside diff --git a/sbr/folder_delmsgs.c b/sbr/folder_delmsgs.c index 3e80bc55..533ab9ba 100644 --- a/sbr/folder_delmsgs.c +++ b/sbr/folder_delmsgs.c @@ -1,13 +1,21 @@ -/* - * folder_delmsgs.c -- "remove" SELECTED messages from a folder +/* folder_delmsgs.c -- "remove" SELECTED messages from a folder * * 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 -#include +#include "h/mh.h" +#include "m_name.h" +#include "seq_save.h" +#include "m_backup.h" +#include "ext_hook.h" +#include "folder_delmsgs.h" +#include "context_save.h" +#include "arglist.h" +#include "error.h" +#include "h/utils.h" +#include "m_mktemp.h" /* * 1) If we are using an external rmmproc, then exec it. @@ -60,7 +68,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook) for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) { if (is_selected (mp, msgnum) && !(vec[vecp++] = strdup (m_name (msgnum)))) - adios (NULL, "strdup failed"); + die("strdup failed"); } vec[vecp] = NULL; @@ -75,11 +83,11 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook) execvp (prog, vec); fprintf (stderr, "unable to exec "); perror (rmmproc); - _exit (-1); + _exit(1); default: arglist_free(prog, vec); - return (pidwait (pid, -1)); + return pidwait(pid, -1); } } @@ -132,7 +140,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook) /* Sanity check */ if (mp->numsel != 0) - adios (NULL, "oops, mp->numsel should be 0"); + die("oops, mp->numsel should be 0"); /* Mark that the sequence information has changed */ mp->msgflags |= SEQMOD;