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