* added compilers lcc and bcc (linux86)
[mascara-docs.git] / compilers / linux86-0.16.17 / libc / string / strncasecmp.c
blob561f72a76208ff8577d1cd0af396da605d0c308f
1 /* Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk>
2 * This file is part of the Linux-8086 C library and is distributed
3 * under the GNU Library General Public License.
4 */
6 #include <string.h>
7 #include <ctype.h>
9 int
10 strncasecmp(s, d, l)
11 char *s;
12 char *d;
13 size_t l;
15 while(l>0)
17 if( *s != *d )
19 if( tolower(*s) != tolower(*d) )
20 return *s - *d;
22 else
23 if( *s == '\0' ) return 0;
24 s++; d++; l--;
26 return 0;