1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Modified Wed Jul 28 11:12:07 1993 by Rik Faith (faith@cs.unc.edu)
25 .\" Japanese Version Copyright (c) 1997 IMAMURA Nobutaka
26 .\" all rights reserved.
27 .\" Translated 1997-02-14, IMAMURA Nobutaka <imamura@spp.hpc.fujitsu.co.jp>
28 .\" Updated 1999-08-29, Kentaro Shirakata <argrath@ub32.org>
29 .\" Updated 2001-11-02, Kentaro Shirakata <argrath@ub32.org>
30 .\" Updated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .TH GETS 3 2008-08-06 "GNU" "Linux Programmer's Manual"
34 fgetc, fgets, getc, getchar, gets, ungetc \- ʸ»ú¤Èʸ»úÎó¤ÎÆþÎÏ
39 .BI "int fgetc(FILE *" stream );
41 .BI "char *fgets(char *" "s" ", int " "size" ", FILE *" "stream" );
43 .BI "int getc(FILE *" stream );
45 .B "int getchar(void);"
47 .BI "char *gets(char *" "s" );
49 .BI "int ungetc(int " c ", FILE *" stream );
59 ¤Ë¥¥ã¥¹¥È¤·¤ÆÊÖ¤¹¡£¥Õ¥¡¥¤¥ë¤Î½ª¤ï¤ê¤ä¥¨¥é¡¼¤È¤Ê¤Ã¤¿¾ì¹ç¤Ï
68 ¤òÊ£¿ô²óɾ²Á¤¹¤ë¥Þ¥¯¥í¤È¤·¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
72 .BI "getc(" stdin ) \fR
82 ¤¬»Ø¤¹¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤¹¤ë
88 ¥Ð¥Ã¥Õ¥¡¡¦¥ª¡¼¥Ð¡¼¥é¥ó¤Î¥Á¥§¥Ã¥¯¤Ï¹Ô¤ï¤ì¤Ê¤¤ (²¼µ¤Î¡Ö¥Ð¥°¡×¤ò»²¾È)¡£
97 ¤¬»Ø¤¹¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤¹¤ë¡£Æɤ߹þ¤ß¤Ï
99 ¤Þ¤¿¤Ï²þ¹Ôʸ»ú¤òÆɤ߹þ¤ó¤À¸å¤ÇÄä»ß¤¹¤ë¡£
100 Æɤ߹þ¤Þ¤ì¤¿²þ¹Ôʸ»ú¤Ï¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤µ¤ì¤ë¡£
102 ʸ»ú¤¬°ì¤Ä¥Ð¥Ã¥Õ¥¡¤ÎÃæ¤ÎºÇ¸å¤Îʸ»ú¤Î¸å¤Ë½ñ¤¹þ¤Þ¤ì¤ë¡£
105 ¤Ï¡¢¸å¤Î read Áàºî¤ÇÆɤá¤ë¤è¤¦¤Ë¡¢
112 ½ñ¤Ìᤵ¤ì¤¿Ê¸»ú¤ÏµÕ½ç¤ËÌᤵ¤ì¤ë;
113 ½ñ¤Ìᤷ¤È¤·¤ÆÊݾڤµ¤ì¤Æ¤¤¤ë¤Î¤Ï¡¢°ìʸ»ú¤À¤±¤Ç¤¢¤ë¡£
117 ¥é¥¤¥Ö¥é¥ê¤ÎÆþÎÏ´Ø¿ô¤òƱ¤¸ÆþÎÏ¥¹¥È¥ê¡¼¥à¤ËÂФ·¤Æ¸ß¤¤¤Ëº®¤¼¤Æ»È¤¦¤³¤È¤¬¤Ç¤¤ë¡£
119 ¤³¤ì¤é¤Î½èÍý¤ò¥í¥Ã¥¯¤»¤º¤Ë¹Ô¤¤¤¿¤¤¤È¤¤Ï¡¢
120 .BR unlocked_stdio (3)
130 ¤Ë¥¥ã¥¹¥È¤·¤ÆÊÖ¤¹¡£¥Õ¥¡¥¤¥ë¤Î½ª¤ï¤ê¤ä¥¨¥é¡¼¤Î¾ì¹ç¤Ï
139 ¤òÊÖ¤·¡¢¥¨¥é¡¼¤ä 1 ʸ»ú¤âÆɤ߹þ¤ó¤Ç¤¤¤Ê¤¤¤Î¤Ë¥Õ¥¡¥¤¥ë¤Î½ª¤ï¤ê¤Ë¤Ê¤Ã¤¿
145 ¤òÊÖ¤·¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ï
149 C89, C99, POSIX.1-2001.
155 ¤Î»ÅÍͤ¬ºï½ü¤µ¤ì¤Æ¤¤¤ë¡£
158 ¤ÏÀäÂФ˻ÈÍѤ·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
159 Á°¤â¤Ã¤Æ¥Ç¡¼¥¿¤òÃΤ뤳¤È¤Ê¤·¤Ë
161 ¤¬²¿Ê¸»úÆɤफ¤òÃΤ뤳¤È¤Ï¤Ç¤¤º¡¢
163 ¤¬¥Ð¥Ã¥Õ¥¡¤Î½ª¤ï¤ê¤ò±Û¤¨¤Æ½ñ¤¹þ¤ß³¤±¤ë¤¿¤á¡¢
165 ¤ò»È¤¦¤Î¤Ï¶Ë¤á¤Æ´í¸±¤Ç¤¢¤ë¡£
166 ¤³¤ì¤òÍøÍѤ·¤Æ¥³¥ó¥Ô¥å¡¼¥¿¤Î¥»¥¥å¥ê¥Æ¥£¤¬Çˤé¤ì¤Æ¤¤¿¡£
171 ÆþÎÏ¥¹¥È¥ê¡¼¥à¤Î¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ËÂФ·¤Æ¡¢
173 ¥é¥¤¥Ö¥é¥ê¤ÎÆþÎÏ´Ø¿ô¤È¡¢Äã¥ì¥Ù¥ë¸Æ¤Ó½Ð¤·¤Î
175 ¤òº®¤¼¤Æ¸Æ¤Ó½Ð¤¹»ö¤Ï´«¤á¤é¤ì¤Ê¤¤¡£
176 ·ë²Ì¤¬¤É¤¦¤Ê¤ë¤«¤Ïʬ¤«¤é¤º¡¢¤ª¤½¤é¤¯¤¢¤Ê¤¿¤Î
177 ˾¤ó¤Ç¤¤¤ë·ë²Ì¤Ë¤Ï¤Ê¤é¤Ê¤¤¤À¤í¤¦¡£
192 .BR unlocked_stdio (3)