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