OSDN Git Service

(split) Apply minor changes from v3.32 to v3.35 in the upstream.
[linuxjm/LDP_man-pages.git] / draft / 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 .\"
29 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
30 .\"     all rights reserved.
31 .\" Translated Wed Dec 17 12:12:15 JST 1997
32 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
33 .\"
34 .TH MEMCMP 3  2011-09-14 "" "Linux Programmer's Manual"
35 .\"O .SH NAME
36 .SH Ì¾Á°
37 .\"O memcmp \- compare memory areas
38 memcmp \- ¥á¥â¥êÎΰè¤òÈæ³Ó¤¹¤ë
39 .\"O .SH SYNOPSIS
40 .SH ½ñ¼°
41 .nf
42 .B #include <string.h>
43 .sp
44 .BI "int memcmp(const void *" s1 ", const void *" s2 ", size_t " n );
45 .fi
46 .\"O .SH DESCRIPTION
47 .SH ÀâÌÀ
48 .\"O The
49 .\"O .BR memcmp ()
50 .\"O function compares the first \fIn\fP bytes (each interpreted as
51 .\"O .IR "unsigned char" )
52 .\"O of the memory areas \fIs1\fP and \fIs2\fP.
53 .\"O It returns an integer less than,
54 .\"O equal to, or greater than zero if \fIs1\fP is found, respectively, to
55 .\"O be less than, to match, or be greater than \fIs2\fP.
56 .BR memcmp ()
57 ´Ø¿ô¤Ï¡¢¥á¥â¥êÎΰè \fIs1\fP ¤È\fIs2\fP ¤ÎºÇ½é¤Î \fIn\fP
58 ¥Ð¥¤¥È¤òÈæ³Ó¤¹¤ë (³Æ¥Ð¥¤¥È¤Ï
59 .I "unsigned char"
60 ¤È¤·¤Æ²ò¼á¤µ¤ì¤ë)¡£
61 \fIs1\fP ¤¬ \fIs2\fP ¤è¤ê¾®¤µ¤¤¤«¡¢Æ±¤¸¤«¡¢¤¢¤ë¤¤¤ÏÂ礭¤¤¤«¤Ë¤è¤Ã¤Æ
62 ¤½¤ì¤¾¤ì¡¢Éé¤ÎÀ°¿ô¡¢0¡¢Àµ¤ÎÀ°¿ô¤òÊÖ¤¹¡£
63 .\"O .SH "RETURN VALUE"
64 .SH ÊÖ¤êÃÍ
65 .\"O The
66 .\"O .BR memcmp ()
67 .\"O function returns an integer less than, equal to, or
68 .\"O greater than zero if the first \fIn\fP bytes of \fIs1\fP is found,
69 .\"O respectively, to be less than, to match, or be greater than the first
70 .\"O \fIn\fP bytes of \fIs2\fP.
71 .BR memcmp ()
72 ´Ø¿ô¤Ï¡¢\fIs1\fP ¤ÎºÇ½é¤Î \fIn\fP ¥Ð¥¤¥È¤¬
73 \fIs2\fP ¤ÎºÇ½é¤Î \fIn\fP ¥Ð¥¤¥È¤è¤ê¤â
74 ¾®¤µ¤¤¤«¡¢Æ±¤¸¤«¡¢¤¢¤ë¤¤¤ÏÂ礭¤¤¤«¤Ë¤è¤Ã¤Æ¤½¤ì¤¾¤ì¡¢Éé¤ÎÀ°¿ô¡¢0¡¢
75 Àµ¤ÎÀ°¿ô¤òÊÖ¤¹¡£
76 .\"O .SH "CONFORMING TO"
77 .SH ½àµò
78 SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
79 .\"O .SH "SEE ALSO"
80 .SH ´ØÏ¢¹àÌÜ
81 .BR bcmp (3),
82 .BR strcasecmp (3),
83 .BR strcmp (3),
84 .BR strcoll (3),
85 .BR strncasecmp (3),
86 .BR strncmp (3),
87 .BR wmemcmp (3)