X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fstrncasecmp.c;h=10feee82198e2105f2591164d413078c1ee7c3e3;hb=69b975477d1abc861452d7cb2c82190e44c47a94;hp=4485cac7a6a2211727d36c3f3573e916c34fa7ce;hpb=252b5132c753830d5fd56823373aed85f2a0db63;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/strncasecmp.c b/libiberty/strncasecmp.c index 4485cac7a6..10feee8219 100644 --- a/libiberty/strncasecmp.c +++ b/libiberty/strncasecmp.c @@ -10,12 +10,22 @@ * is provided ``as is'' without express or implied warranty. */ +/* + +@deftypefn Supplemental int strncasecmp (const char *@var{s1}, const char *@var{s2}) + +A case-insensitive @code{strncmp}. + +@end deftypefn + +*/ + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87"; #endif /* LIBC_SCCS and not lint */ #include -#ifdef __STDC__ +#ifdef ANSI_PROTOTYPES #include #else #define size_t unsigned long @@ -26,7 +36,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87"; * together for a case independent comparison. The mappings are * based upon ascii character sequences. */ -static unsigned char charmap[] = { +static const unsigned char charmap[] = { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',