]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(memcasecmp): Remove static definition of function.
authorJim Meyering <jim@meyering.net>
Wed, 10 Apr 1996 03:47:28 +0000 (03:47 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 10 Apr 1996 03:47:28 +0000 (03:47 +0000)
Include memcasecmp.h instead.

src/join.c

index 1305fe9ce82f1578fd5c6a2e39ef2b0137693bb4..8b2b8bbd6c9cbcfc21e9894ad04b909161043608 100644 (file)
@@ -64,6 +64,7 @@ char *alloca ();
 #include "long-options.h"
 #include "xstrtol.h"
 #include "error.h"
+#include "memcasecmp.h"
 
 #define join system_join
 
@@ -201,24 +202,6 @@ separated by CHAR.\n\
   exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
 }
 
-/* Like memcmp, but ignore differences in case.  */
-
-static int
-memcasecmp (const void *vs1, const void *vs2, size_t n)
-{
-  unsigned int i;
-  unsigned char *s1 = (unsigned char *) vs1;
-  unsigned char *s2 = (unsigned char *) vs2;
-  for (i = 0; i < n; i++)
-    {
-      unsigned char u1 = *s1++;
-      unsigned char u2 = *s2++;
-      if (TOLOWER (u1) != TOLOWER (u2))
-        return TOLOWER (u1) - TOLOWER (u2);
-    }
-  return 0;
-}
-
 static void
 ADD_FIELD (struct line *line, const char *field, size_t len)
 {