Subversion Repositories planix.SVN

Rev

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

Rev Author Line No. Line
2 - 1
#include	<u.h>
2
#include	<libc.h>
3
#include	<bio.h>
4
 
5
int
6
Bputc(Biobufhdr *bp, int c)
7
{
8
	int i;
9
 
10
	for(;;) {
11
		i = bp->ocount;
12
		if(i) {
13
			bp->ebuf[i++] = c;
14
			bp->ocount = i;
15
			return 0;
16
		}
17
		if(Bflush(bp) == Beof)
18
			break;
19
	}
20
	return Beof;
21
}