Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature-vt/sys/src/libbio/bputc.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | 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
}