1
/* strcasecmp.c - case-insensitive strcmp
3
Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
4
This file was part of the GNU C Library. Modified by kb@mail.tug.org to
7
This library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Lesser General Public
9
License as published by the Free Software Foundation; either
10
version 2.1 of the License, or (at your option) any later version.
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public
18
License along with this library; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
#if !defined (__STDC__) || !__STDC__
28
/* This is a separate conditional since some stdc systems
29
reject `defined (const)'. */
37
/* Compare S1 and S2, ignoring case, returning less than, equal to or
38
greater than zero if S1 is lexiographically less than,
39
equal to or greater than S2. */
45
register const unsigned char *p1 = (const unsigned char *) s1;
46
register const unsigned char *p2 = (const unsigned char *) s2;
65
strncasecmp (s1, s2, n)
70
register const unsigned char *p1 = (const unsigned char *) s1;
71
register const unsigned char *p2 = (const unsigned char *) s2;
74
if (p1 == p2 || n == 0)
81
if (c1 == '\0' || c1 != c2)