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


   #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


   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).


   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.)


   For   an   explanation   of   the  terms  used  in  this  section,  see

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


   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.


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


   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

                              2016-03-15                         FERROR(3)

More Linux Commands

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

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

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

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

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

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

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

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

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

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,

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

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.