ref: 80cf8cd0acd5039d149bc86d640b1c2eca7a1f19
dir: /libc/werrstr.c/
#include <u.h> #include <libc.h> char errbuf[ERRMAX]; int rerrstr(char *buf, uint n) { utfecpy(buf, buf+n, errbuf); return utflen(buf); } void werrstr(char *f, ...) { va_list arg; va_start(arg, f); vsnprint(errbuf, sizeof errbuf, f, arg); va_end(arg); }