1MEMCMP(3P)                 POSIX Programmer's Manual                MEMCMP(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       memcmp - compare bytes in memory
13

SYNOPSIS

15       #include <string.h>
16
17       int memcmp(const void *s1, const void *s2, size_t n);
18
19

DESCRIPTION

21       The memcmp() function shall compare the first n bytes (each interpreted
22       as  unsigned  char) of the object pointed to by s1 to the first n bytes
23       of the object pointed to by s2.
24
25       The sign of a non-zero return value shall be determined by the sign  of
26       the  difference  between  the  values  of the first pair of bytes (both
27       interpreted as type unsigned char) that differ  in  the  objects  being
28       compared.
29

RETURN VALUE

31       The  memcmp()  function shall return an integer greater than, equal to,
32       or less than 0, if the object pointed to by s1 is greater  than,  equal
33       to, or less than the object pointed to by s2, respectively.
34

ERRORS

36       No errors are defined.
37
38       The following sections are informative.
39

EXAMPLES

41       None.
42

APPLICATION USAGE

44       None.
45

RATIONALE

47       None.
48

FUTURE DIRECTIONS

50       None.
51

SEE ALSO

53       The Base Definitions volume of IEEE Std 1003.1-2001, <string.h>
54
56       Portions  of  this text are reprinted and reproduced in electronic form
57       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
58       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
59       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
60       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
61       event of any discrepancy between this version and the original IEEE and
62       The  Open Group Standard, the original IEEE and The Open Group Standard
63       is the referee document. The original Standard can be  obtained  online
64       at http://www.opengroup.org/unix/online.html .
65
66
67
68IEEE/The Open Group                  2003                           MEMCMP(3P)
Impressum