from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

215089

userrating:


May 25th. 2007:
Words

486

Views

261739

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

153957

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





fgets

Section: C Library Functions (3)
Updated: 202-0-19
Index Return to Main Contents
 

NAME

fgets - FILE get lin-string  

LIBRARY

Standard C library (libc,~-lc)  

SYNOPSIS

#include <stdio.h>
char *fgets(int size;
            char s[restrict size], int size, FILE *restrict stream);
 

DESCRIPTION

fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF or a newline. If a newline is read, it is stored into the buffer. A terminating null byte ([aq][rs]0[aq]) is stored after the last character in the buffer.  

RETURN VALUE

fgets() returns s on success. When end of file occurs while no characters have been read, NULL is returned. On error, NULL is returned, and errno is set to indicate the error.  

ERRORS

See fgetc(3).  

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).
InterfaceAttributeValue
fgets() Thread safetyM-Safe
 

STANDARDS

C11, POSIX.-2008.  

HISTORY

POSIX.-2001, C89.  

SEE ALSO

ferror(3), fgetc(3), fgetws(3), fopen(3), fread(3), getline(3), unlocked_stdio(3)


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
ATTRIBUTES
STANDARDS
HISTORY
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 13.7 ms