libk  bufflush.fn.c at tip

File mod/kstr/bufflush.fn.c from the latest check-in


#include <k/type.h>
#include <k/str.h>
#include <k/io.h>

kiocond
ksbufflush(ksbuf* b) {
	ksraw str = {b -> cur - b -> buf, b -> buf};
	b -> cur = b -> buf;
	return kiosend(b -> channel, str, null);
}