scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

memcmp.3 (604B)


      1 .TH MEMCMP 3
      2 .SH NAME
      3 memcmp - compare two memory blocks byte by byte
      4 .SH SYNOPSIS
      5 #include <string.h>
      6 
      7 int memcmp (const void *s1, const void *s2, size_t n)
      8 .SH DESCRIPTION
      9 The
     10 .BR memcmp ()
     11 function compares the first
     12 .I n
     13 bytes of the memory blocks pointed to by
     14 .I s1
     15 and
     16 .IR s2 .
     17 The comparison is performed as if each byte were unsigned char.
     18 .SH RETURN VALUE
     19 A positive integer is returned if
     20 .I s1
     21 is lexicographically greater than
     22 .IR s2 ,
     23 zero if the two blocks are equal,
     24 and a negative integer if
     25 .I s1
     26 is lexicographically less than
     27 .IR s2 .
     28 .SH STANDARDS
     29 ISO/IEC 9899:1999 Section 7.21.4.1