Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 0ad2f2991a02c54bb201f750c557ab1a > files > 11

bash-4.4-23.1.1.mga7.src.rpm

--- bash-2.03/lib/glob/my_strcoll.c.old	Thu Jan 20 13:20:39 2000
+++ bash-2.03/lib/glob/my_strcoll.c	Thu Jan 20 13:28:31 2000
@@ -0,0 +1,26 @@
+/* the GNU libc strcoll() function is case insensitive; this is a version
+ * of strcoll() that is case sensitive
+ */
+
+#include <ctype.h>
+#include <string.h>
+
+#include <config.h>
+
+#if defined (HAVE_STRCOLL)
+int
+my_strcoll(s1,s2)
+register unsigned char *s1, *s2;
+{
+	char a[]= { '\0', '\0' };
+	char b[]= { '\0', '\0' };
+
+	while (*s1 && *s2 && (isupper(*s1) == isupper(*s2)))
+	{
+		a[0]=*s1; b[0]=*s2;
+		if (strcoll(a,b) == 0) { s1++; s2++; }
+		else return (strcoll(a,b));
+	}
+	return (a - b);
+}
+#endif