Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/*
2
 * pANS stdio -- sopenw
3
 */
4
#include "iolib.h"
5
 
6
FILE *_IO_sopenw(void){
7
	FILE *f;
8
	for(f=_IO_stream;f!=&_IO_stream[FOPEN_MAX];f++) if(f->state==CLOSED) break;
9
	if(f==&_IO_stream[FOPEN_MAX]) return NULL;
10
	f->buf=f->rp=f->wp=0;
11
	f->state=OPEN;
12
	f->flags=STRING;
13
	f->fd=-1;
14
	return f;
15
}