X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=sbr%2Frefile.c;h=00647ddd1463dbda1d0ce388e1f930b59b755361;hb=240013872c392fe644bd4f79382d9f5314b4ea60;hp=5637d6f84393a3e332380972933f3ba5b8230d1b;hpb=a485ed478abbd599d8c9aab48934e7a26733ecb1;p=mmh diff --git a/sbr/refile.c b/sbr/refile.c index 5637d6f..00647dd 100644 --- a/sbr/refile.c +++ b/sbr/refile.c @@ -1,24 +1,24 @@ /* - * 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 - * COPYRIGHT file in the root directory of the nmh distribution for - * complete copyright information. - */ +** 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 +** COPYRIGHT file in the root directory of the nmh distribution for +** complete copyright information. +*/ #include int -refile (char **arg, char *file) +refile(char **arg, char *file) { pid_t pid; register int vecp; char *vec[MAXARGS]; vecp = 0; - vec[vecp++] = r1bindex (fileproc, '/'); + vec[vecp++] = mhbasename(fileproc); vec[vecp++] = "-nolink"; /* override bad .mh_profile defaults */ vec[vecp++] = "-nopreserve"; vec[vecp++] = "-file"; @@ -35,16 +35,16 @@ refile (char **arg, char *file) switch (pid = vfork()) { case -1: - advise ("fork", "unable to"); + advise("fork", "unable to"); return -1; case 0: - execvp (fileproc, vec); - fprintf (stderr, "unable to exec "); - perror (fileproc); - _exit (-1); + execvp(fileproc, vec); + fprintf(stderr, "unable to exec "); + perror(fileproc); + _exit(-1); default: - return (pidwait (pid, -1)); + return (pidwait(pid, -1)); } }