2 * Copyright notice from original mutt:
5 * This file is part of mutt-ng, see http://www.muttng.org/.
6 * It's licensed under the GNU General Public License,
7 * please see the file GPL in the top level source directory.
11 #include <sys/types.h>
13 /* UnixWare doesn't have these functions in its standard C library */
15 int strncasecmp (char *s1, char *s2, size_t n)
17 register int c1, c2, l = 0;
19 while (*s1 && *s2 && l < n) {
20 c1 = tolower ((unsigned char) *s1);
21 c2 = tolower ((unsigned char) *s2);
31 return (int) (*s1 - *s2);
34 int strcasecmp (char *s1, char *s2)
39 c1 = tolower ((unsigned char) *s1);
40 c2 = tolower ((unsigned char) *s2);
46 return (int) (*s1 - *s2);