summaryrefslogtreecommitdiff
path: root/src/chgrp.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1992-12-08 02:13:30 +0000
committerJim Meyering <jim@meyering.net>1992-12-08 02:13:30 +0000
commitffd97483cdc0d57fccc91fae0c7f4463c143c087 (patch)
tree797f89e39fef5eaf6e6fedfe9a631e12ea3c677b /src/chgrp.c
parentdcded75afccc14f6efdd9e96c6450b65ae46634b (diff)
downloadcoreutils-ffd97483cdc0d57fccc91fae0c7f4463c143c087.tar.xz
(change_file_group): Define ISDIGIT and use it instead of isdigit.
Diffstat (limited to 'src/chgrp.c')
-rw-r--r--src/chgrp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/chgrp.c b/src/chgrp.c
index 57904ac49..3e6c82d7e 100644
--- a/src/chgrp.c
+++ b/src/chgrp.c
@@ -24,6 +24,12 @@
#include <getopt.h>
#include "system.h"
+#ifndef isascii
+#define isascii(c) 1
+#endif
+
+#define ISDIGIT(c) (isascii (c) && isdigit (c))
+
#ifndef _POSIX_VERSION
struct group *getgrnam ();
#endif
@@ -260,7 +266,7 @@ isnumber (str)
char *str;
{
for (; *str; str++)
- if (!isdigit (*str))
+ if (!ISDIGIT (*str))
return 0;
return 1;
}