home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / IO / FREOPEN.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  350 b   |  14 lines

  1. /* freopen.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/emx.h>
  4. #include <stdio.h>
  5. #include <share.h>
  6.  
  7. FILE *freopen (const char *fname, const char *mode, FILE *stream)
  8. {
  9.   if (stream->flags & _IOOPEN)
  10.     if (fclose (stream) != 0)
  11.       return (NULL);
  12.   return (_fopen (stream, fname, mode, SH_DENYNO));
  13. }
  14.