.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 17:52:15 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 2001-12-15, aeb .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka .\" all rights reserved. .\" Translated Fri Dec 19 13:24:02 JST 1997 .\" by HIROFUMI Nishizuka .\" Updated Fri Dec 21 JST 2001 by Kentaro Shirakata .\" .TH SWAB 3 2014\-02\-25 "" "Linux Programmer's Manual" .SH 名前 swab \- 隣接するバイトを交換する .SH 書式 .nf \fB#define _XOPEN_SOURCE\fP /* feature_test_macros(7) 参照 */ \fB#include \fP .sp \fBvoid swab(const void *\fP\fIfrom\fP\fB, void *\fP\fIto\fP\fB, ssize_t \fP\fIn\fP\fB);\fP .fi .SH 説明 \fBswab\fP() 関数は、\fIfrom\fP で指された配列から \fIn\fP バイトを \fIto\fP で指された配列に、隣接した偶数/奇数バイトを交換しながらコピーする。 この関数は異なるバイトオーダーを持つマシン間でのデータ交換に 使用される。 .LP \fIn\fP が負の数の場合、この関数は何もしない。 \fIn\fP が正でかつ奇数の場合、\fIn\-1\fP バイトは上記の通り扱い、 最後のバイトについては未規定の動作をする (言い換えれば、\fIn\fP は偶数にするべきである)。 .SH 返り値 \fBswab\fP() 関数は、値を返さない。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" \fBswab\fP() 関数はスレッドセーフである。 .SH 準拠 SVr4, 4.3BSD, POSIX.1\-2001. .SH 関連項目 \fBbstring\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。