summaryrefslogtreecommitdiff
path: root/lib/backupfile.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-05-13 13:02:08 +0000
committerJim Meyering <jim@meyering.net>1995-05-13 13:02:08 +0000
commit26abb25bd0b2d03b1af01ea8fdba4cff4514e0e7 (patch)
tree89888a13df87eb43038320714bc00bef525ce5ca /lib/backupfile.c
parentd931bb8005ab4cc31a327c93c659397d59425d7e (diff)
downloadcoreutils-26abb25bd0b2d03b1af01ea8fdba4cff4514e0e7.tar.xz
Remove unnecessary definitions for r?index.
Update definitions for ISDIGIT.
Diffstat (limited to 'lib/backupfile.c')
-rw-r--r--lib/backupfile.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/backupfile.c b/lib/backupfile.c
index 288803453..89b5f1e43 100644
--- a/lib/backupfile.c
+++ b/lib/backupfile.c
@@ -26,14 +26,8 @@
#include <ctype.h>
#include <sys/types.h>
#include "backupfile.h"
-#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
+#ifdef HAVE_STRING_H
#include <string.h>
-#ifndef index
-#define index strchr
-#endif
-#ifndef rindex
-#define rindex strrchr
-#endif
#else
#include <strings.h>
#endif
@@ -68,12 +62,13 @@
char *malloc ();
#endif
-#if !defined (isascii) || defined (STDC_HEADERS)
-#undef isascii
-#define isascii(c) 1
+#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
+#define ISASCII(c) 1
+#else
+#define ISASCII(c) isascii(c)
#endif
-#define ISDIGIT(c) (isascii ((unsigned char ) c) \
+#define ISDIGIT(c) (ISASCII ((unsigned char) (c)) \
&& isdigit ((unsigned char) (c)))
#if defined (HAVE_UNISTD_H)