OSDN Git Service

c6b5d494bd77013354b9f692899e63ff4476a38e
[linuxjm/LDP_man-pages.git] / draft / man3 / puts.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
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 .\" License.
23 .\" Modified Sat Jul 24 18:42:59 1993 by Rik Faith (faith@cs.unc.edu)
24 .\"
25 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
26 .\"     all rights reserved.
27 .\" Translated Wed Dec 24 12:33:40 JST 1997
28 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
29 .\" Updated Fri Nov  2 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
30 .\"
31 .TH PUTS 3  2011-09-28 "GNU" "Linux Programmer's Manual"
32 .\"O .SH NAME
33 .SH 名前
34 .\"O fputc, fputs, putc, putchar, puts \- output of characters and strings
35 fputc, fputs, putc, putchar, puts \- 文字と文字列の出力
36 .\"O .SH SYNOPSIS
37 .SH 書式
38 .nf
39 .B #include <stdio.h>
40 .sp
41 .BI "int fputc(int " c ", FILE *" stream );
42
43 .BI "int fputs(const char *" "s" ", FILE *" "stream" );
44
45 .BI "int putc(int " c ", FILE *" stream );
46
47 .BI "int putchar(int " c );
48
49 .BI "int puts(const char *" "s" );
50 .fi
51 .\"O .SH DESCRIPTION
52 .SH 説明
53 .\"O .BR fputc ()
54 .\"O writes the character
55 .\"O .IR c ,
56 .\"O cast to an
57 .\"O .IR "unsigned char" ,
58 .\"O to
59 .\"O .IR stream .
60 .BR fputc ()
61 は、キャラクタ
62 .I c
63
64 .I "unsigned char"
65 にキャストし、
66 .I stream
67 に書き込む。
68 .PP
69 .\"O .BR fputs ()
70 .\"O writes the string
71 .\"O .I s
72 .\"O to
73 .\"O .IR stream ,
74 .\"O without its terminating null byte (\(aq\e0\(aq).
75 .BR fputs ()
76 は、文字列
77 .I s
78
79 .I stream
80 に書き込む。
81 文字列終端の NULL バイト (\(aq\e0\(aq) は出力しない。
82 .PP
83 .\"O .BR putc ()
84 .\"O is equivalent to
85 .\"O .BR fputc ()
86 .\"O except that it may be implemented as a macro which evaluates
87 .\"O .I stream
88 .\"O more than once.
89 .BR putc ()
90 は、
91 .I stream
92 を一度以上評価するマクロとして実装されているかも知れないという点を除き、
93 .BR fputc ()
94 と同じである。
95 .PP
96 .\"O .BI "putchar(" c );
97 .\"O is equivalent to
98 .\"O .BI "putc(" c , stdout ).
99 .BI "putchar(" c );
100 は、
101 .BI "putc(" c , stdout )
102 と同じである。
103 .PP
104 .\"O .BR puts ()
105 .\"O writes the string
106 .\"O .I s
107 .\"O and a trailing newline
108 .\"O to
109 .\"O .IR stdout .
110 .BR puts ()
111 は、文字列
112 .I s
113 と改行を
114 .I stdout
115 に書き込む。
116 .PP
117 .\"O Calls to the functions described here can be mixed with each other and with
118 .\"O calls to other output functions from the
119 .\"O .I stdio
120 .\"O library for the same output stream.
121 ここで説明された関数はお互いに混在して使用することができ、また、
122 .I stdio
123 ライブラリに含まれる他の出力関数を同じ出力ストリームに対して
124 呼び出す事が出来る。
125 .PP
126 .\"O For nonlocking counterparts, see
127 .\"O .BR unlocked_stdio (3).
128 これらの処理をロックせずに行いたいときは、
129 .BR unlocked_stdio (3)
130 を参照のこと。
131 .\"O .SH "RETURN VALUE"
132 .SH 返り値
133 .\"O .BR fputc (),
134 .\"O .BR putc ()
135 .\"O and
136 .\"O .BR putchar ()
137 .\"O return the character written as an
138 .\"O .I unsigned char
139 .\"O cast to an
140 .\"O .I int
141 .\"O or
142 .\"O .B EOF
143 .\"O on error.
144 .BR fputc (),
145 .BR putc (),
146 .BR putchar ()
147
148 .I unsigned char
149 として書き込まれた文字を
150 .I int
151 にキャストして返す。
152 エラーが発生した場合は
153 .B EOF
154 を返す。
155 .PP
156 .\"O .BR puts ()
157 .\"O and
158 .\"O .BR fputs ()
159 .\"O return a nonnegative number on success, or
160 .\"O .B EOF
161 .\"O on error.
162 .BR puts ()
163
164 .BR fputs ()
165 は、成功すると負ではない数を、エラーが発生した場合は
166 .B EOF
167 を返す。
168 .\"O .SH "CONFORMING TO"
169 .SH 準拠
170 C89, C99.
171 .\"O .SH BUGS
172 .SH バグ
173 .\"O It is not advisable to mix calls to output functions from the
174 .\"O .I stdio
175 .\"O library with low-level calls to
176 .\"O .BR write (2)
177 .\"O for the file descriptor associated with the same output stream; the results
178 .\"O will be undefined and very probably not what you want.
179 .I stdio
180 ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた
181 ファイルディスクリプタに対する
182 .BR write (2)
183 の低レベル呼び出しを混在して
184 使用することは賢明ではない。
185 その結果は定義されておらず、望む結果が得られない可能性が高い。
186 .\"O .SH "SEE ALSO"
187 .SH 関連項目
188 .BR write (2),
189 .BR ferror (3),
190 .BR fopen (3),
191 .BR fputwc (3),
192 .BR fputws (3),
193 .BR fseek (3),
194 .BR fwrite (3),
195 .BR gets (3),
196 .BR putwchar (3),
197 .BR scanf (3),
198 .BR unlocked_stdio (3)