ref: e8f5e0909f4a7c7ae2c4e85f563e6b4da88aa98f
dir: /sys/src/ape/lib/ap/stdio/fopen.c/
/*
* pANS stdio -- fopen
*/
#include "iolib.h"
FILE *fopen(const char *name, const char *mode){
FILE *f;
for(f=_IO_stream;f!=&_IO_stream[FOPEN_MAX];f++)
if(f->state==CLOSED)
return freopen(name, mode, f);
return NULL;
}