c80e9e72c9
Sync the section order with the original version. Add missing .Sh LIBRARYs. Submitted by: kano@na.rim.or.jp, Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
155 lines
4.2 KiB
Groff
155 lines
4.2 KiB
Groff
.\" Copyright (c) 1990, 1991, 1993
|
||
.\" The Regents of the University of California. All rights reserved.
|
||
.\"
|
||
.\" This code is derived from software contributed to Berkeley by
|
||
.\" Chris Torek and the American National Standards Committee X3,
|
||
.\" on Information Processing Systems.
|
||
.\"
|
||
.\" Redistribution and use in source and binary forms, with or without
|
||
.\" modification, are permitted provided that the following conditions
|
||
.\" are met:
|
||
.\" 1. Redistributions of source code must retain the above copyright
|
||
.\" notice, this list of conditions and the following disclaimer.
|
||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||
.\" notice, this list of conditions and the following disclaimer in the
|
||
.\" documentation and/or other materials provided with the distribution.
|
||
.\" 3. All advertising materials mentioning features or use of this software
|
||
.\" must display the following acknowledgement:
|
||
.\" This product includes software developed by the University of
|
||
.\" California, Berkeley and its contributors.
|
||
.\" 4. Neither the name of the University nor the names of its contributors
|
||
.\" may be used to endorse or promote products derived from this software
|
||
.\" without specific prior written permission.
|
||
.\"
|
||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||
.\" SUCH DAMAGE.
|
||
.\"
|
||
.\" @(#)fgets.3 8.1 (Berkeley) 6/4/93
|
||
.\"
|
||
.\" %FreeBSD: src/lib/libc/stdio/fgets.3,v 1.6.2.6 2001/12/14 18:33:57 ru Exp %
|
||
.\" $FreeBSD$
|
||
.\"
|
||
.Dd June 4, 1993
|
||
.Dt FGETS 3
|
||
.Os
|
||
.Sh ̾<EFBFBD><EFBFBD>
|
||
.Nm fgets ,
|
||
.Nm gets
|
||
.Nd <EFBFBD><EFBFBD><EFBFBD>ȥ<EFBFBD>फ<EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
.Sh <EFBFBD>饤<EFBFBD>֥<EFBFBD><EFBFBD><EFBFBD>
|
||
.Lb libc
|
||
.Sh <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
.In stdio.h
|
||
.Ft char *
|
||
.Fn fgets "char *str" "int size" "FILE *stream"
|
||
.Ft char *
|
||
.Fn gets "char *str"
|
||
.Sh <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
.Fn fgets
|
||
<EFBFBD>ؿ<EFBFBD><EFBFBD>ϡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
.Fa size
|
||
<EFBFBD>ǻ<EFBFBD><EFBFBD>ꤵ<EFBFBD>줿ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFB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