]> diplodocus.org Git - nmh/blob - sbr/remdir.c
d4da1cbe67d0315e87a15cf939ea6a3eceef6fb5
[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 "context_save.h"
10 #include "error.h"
11
12
13 int
14 remdir (char *dir)
15 {
16 context_save(); /* save the context file */
17 fflush(stdout);
18
19 if (rmdir(dir) == -1) {
20 admonish (dir, "unable to remove directory");
21 return 0;
22 }
23 return 1;
24 }