forked from KolibriOS/kolibrios
libc testsuite + fixes
git-svn-id: svn://kolibrios.org@6433 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
22
programs/develop/ktcc/trunk/libc/stdio/clearerr.c
Normal file
22
programs/develop/ktcc/trunk/libc/stdio/clearerr.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
void clearerr ( FILE * stream )
|
||||
{
|
||||
errno = 0;
|
||||
}
|
||||
|
||||
int ferror ( FILE * stream )
|
||||
{
|
||||
return errno;
|
||||
}
|
||||
|
||||
void perror ( const char * str )
|
||||
{
|
||||
char *msg = strerror(errno);
|
||||
|
||||
if (str)
|
||||
fprintf(stderr, "%s:%s\n", str, msg);
|
||||
else
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
}
|
Reference in New Issue
Block a user