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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [newlib/] [newlib/] [libc/] [string/] [bcmp.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/*
2
FUNCTION
3
        <<bcmp>>---compare two memory areas
4
 
5
INDEX
6
        bcmp
7
 
8
ANSI_SYNOPSIS
9
        #include <string.h>
10
        int bcmp(const char *<[s1]>, const char *<[s2]>, size_t <[n]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <string.h>
14
        int bcmp(<[s1]>, <[s2]>, <[n]>)
15
        char *<[s1]>;
16
        char *<[s2]>;
17
        size_t <[n]>;
18
 
19
DESCRIPTION
20
        This function compares not more than <[n]> characters of the
21
        object pointed to by <[s1]> with the object pointed to by <[s2]>.
22
 
23
        This function is identical to <<memcmp>>.
24
 
25
 
26
 
27
RETURNS
28
        The function returns an integer greater than, equal to or
29
        less than zero  according to whether the object pointed to by
30
        <[s1]> is greater than, equal to or less than the object
31
        pointed to by <[s2]>.
32
 
33
PORTABILITY
34
<<bcmp>> requires no supporting OS subroutines.
35
 
36
QUICKREF
37
        bcmp ansi pure
38
*/
39
 
40
#include <string.h>
41
 
42
int
43
_DEFUN (bcmp, (m1, m2, n),
44
        _CONST char *m1 _AND
45
        _CONST char *m2 _AND
46
        size_t n)
47
 
48
{
49
  return memcmp (m1, m2, n);
50
}

powered by: WebSVN 2.1.0

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