ref: e5527913576a5a62ff0e5c8cb5b9cf6688095f65
dir: /libbio/bputrune.c/
#include "lib9.h" #include <bio.h> int Bputrune(Biobuf *bp, long c) { Rune rune; char str[UTFmax]; int n; rune = c; if(rune < Runeself) { Bputc(bp, rune); return 1; } n = runetochar(str, &rune); if(n == 0) return Bbad; if(Bwrite(bp, str, n) != n) return Beof; return n; }