diff options
Diffstat (limited to 'man3/memcmp.3')
-rw-r--r-- | man3/memcmp.3 | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/man3/memcmp.3 b/man3/memcmp.3 index 853a2bfe..c9b0deb0 100644 --- a/man3/memcmp.3 +++ b/man3/memcmp.3 @@ -25,7 +25,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:55:27 1993 by Rik Faith (faith@cs.unc.edu) -.TH MEMCMP 3 2011-09-14 "" "Linux Programmer's Manual" +.TH MEMCMP 3 2012-11-25 "" "Linux Programmer's Manual" .SH NAME memcmp \- compare memory areas .SH SYNOPSIS @@ -40,9 +40,6 @@ The function compares the first \fIn\fP bytes (each interpreted as .IR "unsigned char" ) of the memory areas \fIs1\fP and \fIs2\fP. -It returns an integer less than, -equal to, or greater than zero if \fIs1\fP is found, respectively, to -be less than, to match, or be greater than \fIs2\fP. .SH "RETURN VALUE" The .BR memcmp () @@ -50,6 +47,14 @@ function returns an integer less than, equal to, or greater than zero if the first \fIn\fP bytes of \fIs1\fP is found, respectively, to be less than, to match, or be greater than the first \fIn\fP bytes of \fIs2\fP. + +For a nonzero return value, the sign is determined by the sign of +the difference between the first pair of bytes (interpreted as +.IR "unsigned char" ) +that differ in +.I s1 +and +.IR s2 . .SH "CONFORMING TO" SVr4, 4.3BSD, C89, C99, POSIX.1-2001. .SH "SEE ALSO" |