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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [string/] [strncasecmp.c] - Blame information for rev 1771

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/* 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
 */
5
 
6
#include <string.h>
7
#include <ctype.h>
8
 
9
int
10
strncasecmp(s, d, l)
11
char *s;
12
char *d;
13
size_t l;
14
{
15
   while(l>0)
16
   {
17
      if( *s != *d )
18
      {
19
         if( tolower(*s) != tolower(*d) )
20
            return *s - *d;
21
      }
22
      else
23
         if( *s == '\0' ) return 0;
24
      s++; d++; l--;
25
   }
26
   return 0;
27
}
28
 

powered by: WebSVN 2.1.0

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