OSDN Git Service

(split) Apply minor changes from v3.32 to v3.35 in the upstream.
[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)