clearerr(3)


NAME

   clearerr, feof, ferror, fileno - check and reset stream status

SYNOPSIS

   #include <stdio.h>

   void clearerr(FILE *stream);

   int feof(FILE *stream);

   int ferror(FILE *stream);

   int fileno(FILE *stream);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

   fileno(): _POSIX_C_SOURCE

DESCRIPTION

   The function clearerr() clears the end-of-file and error indicators for
   the stream pointed to by stream.

   The function feof() tests the  end-of-file  indicator  for  the  stream
   pointed  to by stream, returning nonzero if it is set.  The end-of-file
   indicator can be cleared only by the function clearerr().

   The function ferror() tests the error indicator for the stream  pointed
   to  by stream, returning nonzero if it is set.  The error indicator can
   be reset only by the clearerr() function.

   The function fileno() examines the  argument  stream  and  returns  its
   integer file descriptor.

   For nonlocking counterparts, see unlocked_stdio(3).

ERRORS

   These  functions  should  not fail and do not set the external variable
   errno.  (However, in case fileno() detects that its argument is  not  a
   valid stream, it must return -1 and set errno to EBADF.)

ATTRIBUTES

   For   an   explanation   of   the  terms  used  in  this  section,  see
   attributes(7).

   
   Interface            Attribute      Value   
   
   clearerr(), feof(),  Thread safety  MT-Safe 
   ferror(), fileno()                          
   

CONFORMING TO

   The functions clearerr(), feof(), and ferror()  conform  to  C89,  C99,
   POSIX.1-2001, and POSIX.1-2008.

   The function fileno() conforms to POSIX.1-2001 and POSIX.1-2008.

SEE ALSO

   open(2), fdopen(3), stdio(3), unlocked_stdio(3)

COLOPHON

   This  page  is  part of release 4.09 of the Linux man-pages project.  A
   description of the project, information about reporting bugs,  and  the
   latest     version     of     this    page,    can    be    found    at
   https://www.kernel.org/doc/man-pages/.

                              2016-03-15                         FERROR(3)


More Linux Commands

manpages/gitmodules.5.html
gitmodules(5) - defining submodule properties (Man Page)....
The .gitmodules file, located in the top-level directory of a Git working tree, is a text file with a syntax matching the requirements of git-config(1). The fil

manpages/systemd-bootchart.1.html
systemd-bootchart(1) Boot performance graphing tool.........
systemd-bootchart is a tool, usually run at system startup, that collects the CPU load, disk load, memory usage, as well as per-process information from a runni

manpages/Apache::TestRunPerl.3pm.html
Apache::TestRunPerl(3pm) - Run mod_perl-requiring Test Suite
The Apache::TestRunPerl package controls the configuration and running of the test suite. Its a subclass of Apache::TestRun, and should be used only when you ne

manpages/unpack200-java-1.8.0-openjdk.1.html
unpack200-java-1.8.0-openjdk(1) Transforms a packed file pro
The unpack200 command is a native implementation that transforms a packed file produced by pack200-java-1.8.0-openjdk(1) into a JAR file. A typical usage follow

manpages/Tk_FreeColor.3.html
Tk_FreeColor(3) - maintain database of colors (Man Page)....
These procedures manage the colors being used by a Tk application. They allow colors to be shared whenever possible, so that colormap space is preserved, and th

manpages/pambackground.1.html
pambackground(1) - create a mask of the background area of a
This program is part of Netpbm(1) pambackground reads a PNM or PAM image as input. It generates as output a PAM image that identifies the background area of the

manpages/git-verify-tag.1.html
git-verify-tag(1) - Check the GPG signature of tags.........
Validates the gpg signature created by git tag. OPTIONS -v, --verbose Print the contents of the tag object before validating it. &lt;tag&gt;... SHA-1 identifiers of G

manpages/lsof.8.html
lsof(8) - list open files (Administration - Linux man page)
Lsof revision 4.84 lists on its standard output file information about files opened by processes for the following UNIX dialects: AIX 5.3 Apple Darwin 9 (Mac OS

manpages/gnutls_pkcs11_token_get_url.3.html
gnutls_pkcs11_token_get_url(3) - API function (Man Page)....
This function will return the URL for each token available in system. The url has to be released using gnutls_free() RETURNS On success, GNUTLS_E_SUCCESS (0) is

manpages/git-cherry.1.html
git-cherry(1) - Find commits not merged upstream (Man Page)
Determine whether there are commits in &lt;head&gt;..&lt;upstream&gt; that are equivalent to those in the range &lt;limit&gt;..&lt;head&gt;. The equivalence test is based on the diff,

manpages/smtpd.8.html
smtpd(8) - Postfix SMTP server (Admin - Linux man page).....
The SMTP server accepts network connection requests and performs zero or more SMTP transactions per connection. Each received message is piped through the clean

manpages/XrmCombineDatabase.3.html
XrmCombineDatabase(3) - merge resource databases (Man Page)
Calling the XrmMergeDatabases function is equivalent to calling the XrmCombineDatabase function with an override argument of True. The XrmCombineDatabase functi





We can't live, work or learn in freedom unless the software we use is free.