os/ossrv/genericopenlibs/cstdlib/LSTDIO/CLEARERR.C
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LSTDIO/CLEARERR.C	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,74 @@
     1.4 +/* CLEARERR.C
     1.5 + * 
     1.6 + * Portions Copyright (c) 1990-1999 Nokia Corporation and/or its subsidiary(-ies).
     1.7 + * All rights reserved.
     1.8 + */
     1.9 +
    1.10 +/*
    1.11 + * Copyright (c) 1990 The Regents of the University of California.
    1.12 + * All rights reserved.
    1.13 + *
    1.14 + * Redistribution and use in source and binary forms are permitted
    1.15 + * provided that the above copyright notice and this paragraph are
    1.16 + * duplicated in all such forms and that any documentation,
    1.17 + * advertising materials, and other materials related to such
    1.18 + * distribution and use acknowledge that the software was developed
    1.19 + * by the University of California, Berkeley.  The name of the
    1.20 + * University may not be used to endorse or promote products derived
    1.21 + * from this software without specific prior written permission.
    1.22 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    1.23 + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    1.24 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    1.25 + */
    1.26 +
    1.27 +/*
    1.28 +FUNCTION
    1.29 +<<clearerr>>---clear file or stream error indicator
    1.30 +
    1.31 +INDEX
    1.32 +	clearerr
    1.33 +
    1.34 +ANSI_SYNOPSIS
    1.35 +	#include <stdio.h>
    1.36 +	void clearerr(FILE *<[fp]>);
    1.37 +
    1.38 +TRAD_SYNOPSIS
    1.39 +	#include <stdio.h>
    1.40 +	void clearerr(<[fp]>)
    1.41 +	FILE *<[fp]>;
    1.42 +
    1.43 +DESCRIPTION
    1.44 +The <<stdio>> functions maintain an error indicator with each file
    1.45 +pointer <[fp]>, to record whether any read or write errors have
    1.46 +occurred on the associated file or stream.  Similarly, it maintains an
    1.47 +end-of-file indicator to record whether there is no more data in the
    1.48 +file.
    1.49 +
    1.50 +Use <<clearerr>> to reset both of these indicators.
    1.51 +
    1.52 +See <<ferror>> and <<feof>> to query the two indicators.
    1.53 +
    1.54 +
    1.55 +RETURNS
    1.56 +<<clearerr>> does not return a result.
    1.57 +
    1.58 +PORTABILITY
    1.59 +ANSI C requires <<clearerr>>.
    1.60 +
    1.61 +No supporting OS subroutines are required.
    1.62 +*/
    1.63 +
    1.64 +#include <stdio.h>
    1.65 +#include "LOCAL.H"
    1.66 +#undef	clearerr
    1.67 +
    1.68 +/**
    1.69 +Reset error indicators.
    1.70 +Reset error and EOF indicators of the given stream.
    1.71 +@param fp pointer to an open file.
    1.72 +*/
    1.73 +EXPORT_C void
    1.74 +clearerr (FILE * fp)
    1.75 +{
    1.76 +  __sclearerr (fp);
    1.77 +}