.\" Copyright (c) 1995 by Jim Van Zandt .\" .\" %%%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 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka .\" all rights reserved. .\" Translated Wed Dec 24 12:33:19 JST 1997 .\" by HIROFUMI Nishizuka .\" Updated Sun Jun 18 16:38:02 JST 2000 .\" by Kentaro Shirakata .\" .TH GETW 3 2010\-09\-26 GNU "Linux Programmer's Manual" .SH 名前 getw, putw \- ワード(int)の入出力 .SH 書式 .nf \fB#include \fP .sp \fBint getw(FILE *\fP\fIstream\fP\fB);\fP \fBint putw(int \fP\fIw\fP\fB, FILE *\fP\fIstream\fP\fB);\fP .fi .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBgetw\fP(), \fBputw\fP(): .ad l .PD 0 .RS 4 .TP 4 glibc 2.3.3 以降: _SVID_SOURCE || _BSD_SOURCE || .br (_XOPEN_SOURCE && !(_POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600)) .TP glibc 2.3.3 より前: _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE .RE .PD .ad .SH 説明 \fBgetw\fP() は \fIstream\fP からワード (\fIint\fP型) を読み込む。 この関数は、SVr4 との互換性のために提供されている。 この関数の代わりに \fBfread\fP(3) を使用することを勧める。 .P \fBputw\fP() は \fIstream\fP にワード \fIw\fP (\fIint\fP型) を書き込む。 この関数は SVr4 との互換性のために提供されているが、この関数の代わりに \fBfwrite\fP(3) を使用することを勧める。 .SH 返り値 通常、 \fBgetw\fP() は読み込んだワードを返し、 \fBputw\fP() は 0 を返す。 エラーが発生した場合、これらの関数は \fBEOF\fP を返す。 .SH 準拠 SVr4, SUSv2. POSIX.1\-2001 には存在しない。 .SH バグ エラーの時に返される値は、正しいデータとして返されることもある。 \fBferror\fP(3) を用いると、この二つの場合を区別することが出来る。 .SH 関連項目 \fBferror\fP(3), \fBfread\fP(3), \fBfwrite\fP(3), \fBgetc\fP(3), \fBputc\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。