OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [newlib/] [libc/] [stdio/] [feof.c] - Diff between revs 207 and 345

Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 345
/*
/*
 * Copyright (c) 1990 The Regents of the University of California.
 * Copyright (c) 1990 The Regents of the University of California.
 * All rights reserved.
 * All rights reserved.
 *
 *
 * Redistribution and use in source and binary forms are permitted
 * Redistribution and use in source and binary forms are permitted
 * provided that the above copyright notice and this paragraph are
 * provided that the above copyright notice and this paragraph are
 * duplicated in all such forms and that any documentation,
 * duplicated in all such forms and that any documentation,
 * advertising materials, and other materials related to such
 * advertising materials, and other materials related to such
 * distribution and use acknowledge that the software was developed
 * distribution and use acknowledge that the software was developed
 * by the University of California, Berkeley.  The name of the
 * by the University of California, Berkeley.  The name of the
 * University may not be used to endorse or promote products derived
 * University may not be used to endorse or promote products derived
 * from this software without specific prior written permission.
 * from this software without specific prior written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */
 */
 
 
/*
/*
FUNCTION
FUNCTION
<<feof>>---test for end of file
<<feof>>---test for end of file
 
 
INDEX
INDEX
        feof
        feof
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <stdio.h>
        #include <stdio.h>
        int feof(FILE *<[fp]>);
        int feof(FILE *<[fp]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        #include <stdio.h>
        #include <stdio.h>
        int feof(<[fp]>)
        int feof(<[fp]>)
        FILE *<[fp]>;
        FILE *<[fp]>;
 
 
DESCRIPTION
DESCRIPTION
<<feof>> tests whether or not the end of the file identified by <[fp]>
<<feof>> tests whether or not the end of the file identified by <[fp]>
has been reached.
has been reached.
 
 
RETURNS
RETURNS
<<feof>> returns <<0>> if the end of file has not yet been reached; if
<<feof>> returns <<0>> if the end of file has not yet been reached; if
at end of file, the result is nonzero.
at end of file, the result is nonzero.
 
 
PORTABILITY
PORTABILITY
<<feof>> is required by ANSI C.
<<feof>> is required by ANSI C.
 
 
No supporting OS subroutines are required.
No supporting OS subroutines are required.
*/
*/
 
 
#include <stdio.h>
#include <stdio.h>
#include "local.h"
#include "local.h"
 
 
/* A subroutine version of the macro feof.  */
/* A subroutine version of the macro feof.  */
 
 
#undef feof
#undef feof
 
 
int
int
_DEFUN(feof, (fp),
_DEFUN(feof, (fp),
       FILE * fp)
       FILE * fp)
{
{
  int result;
  int result;
  CHECK_INIT(_REENT, fp);
  CHECK_INIT(_REENT, fp);
  _flockfile (fp);
  _flockfile (fp);
  result = __sfeof (fp);
  result = __sfeof (fp);
  _funlockfile (fp);
  _funlockfile (fp);
  return result;
  return result;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.