freopen.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
freopen.c (257B)
---
1 #include <stdio.h>
2
3 #include "../syscall.h"
4 #include "../libc.h"
5
6 #undef freopen
7
8 FILE *
9 freopen(const char * restrict name, const char * restrict mode,
10 FILE * restrict fp)
11 {
12 if (fclose(fp) == EOF)
13 return NULL;
14 return _fpopen(name, mode, fp);
15 }