Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. void clearerr ( FILE * stream )
  5. {
  6.     errno = 0;
  7. }
  8.  
  9. int ferror ( FILE * stream )
  10. {
  11.     return errno;
  12. }
  13.  
  14. void perror ( const char * str )
  15. {
  16.     char *msg = strerror(errno);
  17.  
  18.     if (str)
  19.         fprintf(stderr, "%s:%s\n", str, msg);
  20.     else
  21.         fprintf(stderr, "%s\n", msg);
  22. }
  23.