OSDN Git Service

6d9975baeaba6745708686037f5f2446b9a8cfbb
[linuxjm/LDP_man-pages.git] / original / man3 / memcmp.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sat Jul 24 18:55:27 1993 by Rik Faith (faith@cs.unc.edu)
28 .TH MEMCMP 3  1993-04-10 "" "Linux Programmer's Manual"
29 .SH NAME
30 memcmp \- compare memory areas
31 .SH SYNOPSIS
32 .nf
33 .B #include <string.h>
34 .sp
35 .BI "int memcmp(const void *" s1 ", const void *" s2 ", size_t " n );
36 .fi
37 .SH DESCRIPTION
38 The
39 .BR memcmp ()
40 function compares the first \fIn\fP bytes of the
41 memory areas \fIs1\fP and \fIs2\fP.
42 It returns an integer less than,
43 equal to, or greater than zero if \fIs1\fP is found, respectively, to
44 be less than, to match, or be greater than \fIs2\fP.
45 .SH "RETURN VALUE"
46 The
47 .BR memcmp ()
48 function returns an integer less than, equal to, or
49 greater than zero if the first \fIn\fP bytes of \fIs1\fP is found,
50 respectively, to be less than, to match, or be greater than the first
51 \fIn\fP bytes of \fIs2\fP.
52 .SH "CONFORMING TO"
53 SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
54 .SH "SEE ALSO"
55 .BR bcmp (3),
56 .BR strcasecmp (3),
57 .BR strcmp (3),
58 .BR strcoll (3),
59 .BR strncasecmp (3),
60 .BR strncmp (3),
61 .BR wmemcmp (3)