sl@0
|
1 |
/* CLEARERR.C
|
sl@0
|
2 |
*
|
sl@0
|
3 |
* Portions Copyright (c) 1990-1999 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
4 |
* All rights reserved.
|
sl@0
|
5 |
*/
|
sl@0
|
6 |
|
sl@0
|
7 |
/*
|
sl@0
|
8 |
* Copyright (c) 1990 The Regents of the University of California.
|
sl@0
|
9 |
* All rights reserved.
|
sl@0
|
10 |
*
|
sl@0
|
11 |
* Redistribution and use in source and binary forms are permitted
|
sl@0
|
12 |
* provided that the above copyright notice and this paragraph are
|
sl@0
|
13 |
* duplicated in all such forms and that any documentation,
|
sl@0
|
14 |
* advertising materials, and other materials related to such
|
sl@0
|
15 |
* distribution and use acknowledge that the software was developed
|
sl@0
|
16 |
* by the University of California, Berkeley. The name of the
|
sl@0
|
17 |
* University may not be used to endorse or promote products derived
|
sl@0
|
18 |
* from this software without specific prior written permission.
|
sl@0
|
19 |
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
sl@0
|
20 |
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
sl@0
|
21 |
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
sl@0
|
22 |
*/
|
sl@0
|
23 |
|
sl@0
|
24 |
/*
|
sl@0
|
25 |
FUNCTION
|
sl@0
|
26 |
<<clearerr>>---clear file or stream error indicator
|
sl@0
|
27 |
|
sl@0
|
28 |
INDEX
|
sl@0
|
29 |
clearerr
|
sl@0
|
30 |
|
sl@0
|
31 |
ANSI_SYNOPSIS
|
sl@0
|
32 |
#include <stdio.h>
|
sl@0
|
33 |
void clearerr(FILE *<[fp]>);
|
sl@0
|
34 |
|
sl@0
|
35 |
TRAD_SYNOPSIS
|
sl@0
|
36 |
#include <stdio.h>
|
sl@0
|
37 |
void clearerr(<[fp]>)
|
sl@0
|
38 |
FILE *<[fp]>;
|
sl@0
|
39 |
|
sl@0
|
40 |
DESCRIPTION
|
sl@0
|
41 |
The <<stdio>> functions maintain an error indicator with each file
|
sl@0
|
42 |
pointer <[fp]>, to record whether any read or write errors have
|
sl@0
|
43 |
occurred on the associated file or stream. Similarly, it maintains an
|
sl@0
|
44 |
end-of-file indicator to record whether there is no more data in the
|
sl@0
|
45 |
file.
|
sl@0
|
46 |
|
sl@0
|
47 |
Use <<clearerr>> to reset both of these indicators.
|
sl@0
|
48 |
|
sl@0
|
49 |
See <<ferror>> and <<feof>> to query the two indicators.
|
sl@0
|
50 |
|
sl@0
|
51 |
|
sl@0
|
52 |
RETURNS
|
sl@0
|
53 |
<<clearerr>> does not return a result.
|
sl@0
|
54 |
|
sl@0
|
55 |
PORTABILITY
|
sl@0
|
56 |
ANSI C requires <<clearerr>>.
|
sl@0
|
57 |
|
sl@0
|
58 |
No supporting OS subroutines are required.
|
sl@0
|
59 |
*/
|
sl@0
|
60 |
|
sl@0
|
61 |
#include <stdio.h>
|
sl@0
|
62 |
#include "LOCAL.H"
|
sl@0
|
63 |
#undef clearerr
|
sl@0
|
64 |
|
sl@0
|
65 |
/**
|
sl@0
|
66 |
Reset error indicators.
|
sl@0
|
67 |
Reset error and EOF indicators of the given stream.
|
sl@0
|
68 |
@param fp pointer to an open file.
|
sl@0
|
69 |
*/
|
sl@0
|
70 |
EXPORT_C void
|
sl@0
|
71 |
clearerr (FILE * fp)
|
sl@0
|
72 |
{
|
sl@0
|
73 |
__sclearerr (fp);
|
sl@0
|
74 |
}
|