X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/177f020f122827214159c46dcfe7ded1e3c8d1c3..6345e60c392bbf92b3d7ca2bba473f9da5c073ff:/sbr/folder_delmsgs.c diff --git a/sbr/folder_delmsgs.c b/sbr/folder_delmsgs.c index 92c7ca39..f9d7f591 100644 --- a/sbr/folder_delmsgs.c +++ b/sbr/folder_delmsgs.c @@ -5,8 +5,11 @@ * complete copyright information. */ -#include -#include +#include "h/mh.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. @@ -59,7 +62,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; @@ -74,11 +77,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); } } @@ -131,7 +134,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;