Move werrstr into errstr, so that if you use werrstr

you have to get this __errfmt instead of the one
in libfmt that only does Unix error codes.
This commit is contained in:
rsc 2003-10-14 02:10:47 +00:00
parent 8110278003
commit 169aba14a4
3 changed files with 14 additions and 14 deletions

View file

@ -66,3 +66,15 @@ __errfmt(Fmt *f)
return fmtstrcpy(f, getsyserr());
return fmtstrcpy(f, strerror(errno));
}
void
werrstr(char *fmt, ...)
{
va_list arg;
char buf[ERRMAX];
va_start(arg, fmt);
vseprint(buf, buf+ERRMAX, fmt, arg);
va_end(arg);
errstr(buf, ERRMAX);
}