GNU file utilities FILEUTILS-3_4_6
authorJim Meyering <jim@meyering.net>
Wed, 7 Apr 1993 04:52:01 +0000 (04:52 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 7 Apr 1993 04:52:01 +0000 (04:52 +0000)
lib/Makefile.in
lib/backupfile.c
lib/fnmatch.c
lib/makepath.c
lib/userspec.c

index d441c4e..fb21e13 100644 (file)
@@ -64,7 +64,10 @@ realclean: distclean
        rm -f TAGS
 
 dist:
-       ln $(DISTFILES) ../`cat ../.fname`/lib
+       for file in $(DISTFILES); do \
+         ln $$file ../`cat ../.fname`/lib \
+           || cp $$file ../`cat ../.fname`/lib; \
+       done
 
 libfu.a: $(OBJECTS)
        rm -f $@
index 94bb55a..7a624cf 100644 (file)
 char *malloc ();
 #endif
 
-#ifndef isascii
-#define ISDIGIT(c) (isdigit ((unsigned char) (c)))
-#else
-#define ISDIGIT(c) (isascii (c) && isdigit (c))
+#if !defined (isascii) || defined (STDC_HEADERS)
+#undef isascii
+#define isascii(c) 1
 #endif
 
+#define ISDIGIT(c) (isascii ((unsigned char ) c) \
+                   && isdigit ((unsigned char) (c)))
+
 #if defined (HAVE_UNISTD_H)
 #include <unistd.h>
 #endif
index be662d9..20e2b50 100644 (file)
@@ -77,7 +77,8 @@ fnmatch (pattern, string, flags)
            return 0;
 
          {
-           char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? FOLD (*p) : c;
+           char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
+           c1 = FOLD (c1);
            for (--p; *n != '\0'; ++n)
              if ((c == '[' || FOLD (*n) == c1) &&
                  fnmatch (p, n, flags & ~FNM_PERIOD) == 0)
index 12da458..4c19630 100644 (file)
@@ -51,7 +51,9 @@ extern int errno;
 
 #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
 #include <string.h>
+#ifndef index
 #define index strchr
+#endif
 #else
 #include <strings.h>
 #endif
@@ -93,7 +95,7 @@ make_path (argpath, mode, parent_mode, owner, group, verbose_fmt_string)
   int retval = 0;
   int oldmask = umask (0);
 
-  dirpath = alloca (strlen (argpath) + 1);
+  dirpath = (char *) alloca (strlen (argpath) + 1);
   strcpy (dirpath, argpath);
 
   if (stat (dirpath, &stats))
index a417cca..44d7d91 100644 (file)
@@ -24,7 +24,9 @@
 
 #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
 #include <string.h>
+#ifndef index
 #define index strchr
+#endif
 #else
 #include <strings.h>
 #endif