OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[linuxjm/LDP_man-pages.git] / draft / man3 / swab.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 17:52:15 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified 2001-12-15, aeb
29 .\"
30 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
31 .\"     all rights reserved.
32 .\" Translated Fri Dec 19 13:24:02 JST 1997
33 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
34 .\" Updated Fri Dec 21 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
35 .\"
36 .TH SWAB 3  2001-12-15 "" "Linux Programmer's Manual"
37 .\"O .SH NAME
38 .SH Ì¾Á°
39 .\"O swab \- swap adjacent bytes
40 swab \- ÎÙÀܤ¹¤ë¥Ð¥¤¥È¤ò¸ò´¹¤¹¤ë
41 .\"O .SH SYNOPSIS
42 .SH ½ñ¼°
43 .nf
44 .\"O .BR "#define _XOPEN_SOURCE" "       /* See feature_test_macros(7) */"
45 .BR "#define _XOPEN_SOURCE" "       /* feature_test_macros(7) »²¾È */"
46 .B #include <unistd.h>
47 .sp
48 .BI "void swab(const void *" from ", void *" to ", ssize_t " n );
49 .fi
50 .\"O .SH DESCRIPTION
51 .SH ÀâÌÀ
52 .\"O The
53 .\"O .BR swab ()
54 .\"O function copies \fIn\fP bytes from the array pointed
55 .\"O to by \fIfrom\fP to the array pointed to by \fIto\fP, exchanging
56 .\"O adjacent even and odd bytes.
57 .\"O This function is used to exchange data
58 .\"O between machines that have different low/high byte ordering.
59 .BR swab ()
60 ´Ø¿ô¤Ï¡¢\fIfrom\fP ¤Ç»Ø¤µ¤ì¤¿ÇÛÎ󤫤é \fIn\fP ¥Ð¥¤¥È¤ò
61 \fIto\fP ¤Ç»Ø¤µ¤ì¤¿ÇÛÎó¤Ë¡¢ÎÙÀܤ·¤¿¶ö¿ô/´ñ¿ô¥Ð¥¤¥È¤ò¸ò´¹¤·¤Ê¤¬¤é¥³¥Ô¡¼¤¹¤ë¡£
62 ¤³¤Î´Ø¿ô¤Ï°Û¤Ê¤ë¥Ð¥¤¥È¥ª¡¼¥À¡¼¤ò»ý¤Ä¥Þ¥·¥ó´Ö¤Ç¤Î¥Ç¡¼¥¿¸ò´¹¤Ë
63 »ÈÍѤµ¤ì¤ë¡£
64 .LP
65 .\"O This function does nothing when \fIn\fP is negative.
66 .\"O When \fIn\fP is positive and odd, it handles \fIn\-1\fP bytes
67 .\"O as above, and does something unspecified with the last byte.
68 .\"O (In other words, \fIn\fP should be even.)
69 \fIn\fP ¤¬Éé¤Î¿ô¤Î¾ì¹ç¡¢¤³¤Î´Ø¿ô¤Ï²¿¤â¤·¤Ê¤¤¡£
70 \fIn\fP ¤¬Àµ¤Ç¤«¤Ä´ñ¿ô¤Î¾ì¹ç¡¢\fIn\-1\fP ¥Ð¥¤¥È¤Ï¾åµ­¤ÎÄ̤갷¤¤¡¢
71 ºÇ¸å¤Î¥Ð¥¤¥È¤Ë¤Ä¤¤¤Æ¤Ï̤µ¬Äê¤ÎÆ°ºî¤ò¤¹¤ë
72 (¸À¤¤´¹¤¨¤ì¤Ð¡¢\fIn\fP ¤Ï¶ö¿ô¤Ë¤¹¤ë¤Ù¤­¤Ç¤¢¤ë)¡£
73 .\"O .SH "RETURN VALUE"
74 .SH ÊÖ¤êÃÍ
75 .\"O The
76 .\"O .BR swab ()
77 .\"O function returns no value.
78 .BR swab ()
79 ´Ø¿ô¤Ï¡¢ÃͤòÊÖ¤µ¤Ê¤¤¡£
80 .\"O .SH "CONFORMING TO"
81 .SH ½àµò
82 SVr4, 4.3BSD, POSIX.1-2001.
83 .\"O .SH "SEE ALSO"
84 .SH ´ØÏ¢¹àÌÜ
85 .BR bstring (3)