home *** CD-ROM | disk | FTP | other *** search
- /* memicmp.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
-
- #include <string.h>
- #include <ctype.h>
-
- int memicmp (const void *s1, const void *s2, size_t n)
- {
- size_t i;
- int d;
-
- for (i = 0; i < n; ++i)
- {
- d = tolower (((unsigned char *)s1)[i])
- - tolower (((unsigned char *)s2)[i]);
- if (d != 0)
- {
- if (d > 0)
- return (1);
- else
- return (-1);
- }
- }
- return (0);
- }
-