OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [string/] [strcasecmp.c] - Diff between revs 39 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 39 Rev 56
Line 30... Line 30...
 
 
PORTABILITY
PORTABILITY
<<strcasecmp>> is in the Berkeley Software Distribution.
<<strcasecmp>> is in the Berkeley Software Distribution.
 
 
<<strcasecmp>> requires no supporting OS subroutines. It uses
<<strcasecmp>> requires no supporting OS subroutines. It uses
toupper() from elsewhere in this library.
tolower() from elsewhere in this library.
 
 
QUICKREF
QUICKREF
        strcasecmp
        strcasecmp
*/
*/
 
 
Line 44... Line 44...
int
int
_DEFUN (strcasecmp, (s1, s2),
_DEFUN (strcasecmp, (s1, s2),
        _CONST char *s1 _AND
        _CONST char *s1 _AND
        _CONST char *s2)
        _CONST char *s2)
{
{
  while (*s1 != '\0' && toupper(*s1) == toupper(*s2))
  while (*s1 != '\0' && tolower(*s1) == tolower(*s2))
    {
    {
      s1++;
      s1++;
      s2++;
      s2++;
    }
    }
 
 
  return toupper(*(unsigned char *) s1) - toupper(*(unsigned char *) s2);
  return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
}
}
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.