summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-12-09 15:52:09 +0000
committerJim Meyering <jim@meyering.net>1999-12-09 15:52:09 +0000
commitaeabe74421380e8b2c86bd1ac5a4b12ecc347105 (patch)
tree014ee61c42e3801ed76b216e9a18e925201e4b3d
parent46b6c26e4f49a031cd2a386a63ec104c32011895 (diff)
downloadcoreutils-aeabe74421380e8b2c86bd1ac5a4b12ecc347105.tar.xz
(IGNORE_FAIL_ON_NON_EMPTY_OPTION): Likewise.
-rw-r--r--src/rmdir.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/rmdir.c b/src/rmdir.c
index 1a5b20b29..aa5293e33 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -58,11 +58,19 @@ static int ignore_fail_on_non_empty;
/* If nonzero, output a diagnostic for every directory processed. */
static int verbose;
+/* For long options that have no equivalent short option, use a
+ non-character as a pseudo short option, starting with CHAR_MAX + 1. */
+enum
+{
+ IGNORE_FAIL_ON_NON_EMPTY_OPTION = CHAR_MAX + 1
+};
+
static struct option const longopts[] =
{
/* Don't name this `--force' because it's not close enough in meaning
to e.g. rm's -f option. */
- {"ignore-fail-on-non-empty", no_argument, NULL, CHAR_MAX + 1},
+ {"ignore-fail-on-non-empty", no_argument, NULL,
+ IGNORE_FAIL_ON_NON_EMPTY_OPTION},
{"path", no_argument, NULL, 'p'},
{"parents", no_argument, NULL, 'p'},
@@ -177,7 +185,7 @@ main (int argc, char **argv)
case 'p':
empty_paths = 1;
break;
- case CHAR_MAX + 1:
+ case IGNORE_FAIL_ON_NON_EMPTY_OPTION:
ignore_fail_on_non_empty = 1;
break;
case 14: