X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/3bd5ce286fa6983f3f3f9fda4ff7f2f96c2a22a2..600d446465259dea809dd1223d0e727585ddac6b:/sbr/refile.c diff --git a/sbr/refile.c b/sbr/refile.c index 43ad908e..b4442f18 100644 --- a/sbr/refile.c +++ b/sbr/refile.c @@ -1,6 +1,4 @@ - -/* - * refile.c -- call the "fileproc" to refile the +/* refile.c -- call the "fileproc" to refile the * -- msg or draft into another folder * * This code is Copyright (c) 2002, by the authors of nmh. See the @@ -8,8 +6,13 @@ * complete copyright information. */ -#include -#include +#include "h/mh.h" +#include "refile.h" +#include "getcpy.h" +#include "context_save.h" +#include "arglist.h" +#include "error.h" +#include "h/utils.h" int @@ -29,7 +32,7 @@ refile (char **arg, char *file) if (arg) { while (*arg) - vec[vecp++] = *arg++; + vec[vecp++] = mh_xstrdup(*arg++); } vec[vecp] = NULL; @@ -45,10 +48,10 @@ refile (char **arg, char *file) execvp (program, vec); fprintf (stderr, "unable to exec "); perror (fileproc); - _exit (-1); + _exit(1); default: arglist_free(program, vec); - return (pidwait (pid, -1)); + return pidwait(pid, -1); } }