]> diplodocus.org Git - nmh/blob - sbr/remdir.c
18ea92449801a7bf8c68c4299f41e640888cc7e4
[nmh] / sbr / remdir.c
1 /* remdir.c -- remove a directory
2 *
3 * This code is Copyright (c) 2002, by the authors of nmh. See the
4 * COPYRIGHT file in the root directory of the nmh distribution for
5 * complete copyright information.
6 */
7
8 #include "h/mh.h"
9 #include "error.h"
10
11
12 int
13 remdir (char *dir)
14 {
15 context_save(); /* save the context file */
16 fflush(stdout);
17
18 if (rmdir(dir) == -1) {
19 admonish (dir, "unable to remove directory");
20 return 0;
21 }
22 return 1;
23 }