commit 169aba14a4766b3d15695ef27681d0f1d04f8521 from: rsc date: Tue Oct 14 02:10:47 2003 UTC 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. commit - 8110278003252f8579d61cd99392801a1857cdc2 commit + 169aba14a4766b3d15695ef27681d0f1d04f8521 blob - 885d205c493778f8254899e736d61ed544b29e90 blob + f702a5c514e73a0a8d5fac2e17d0512b07a03c57 --- src/lib9/Makefile +++ src/lib9/Makefile @@ -16,10 +16,12 @@ OFILES=\ lock.$O\ malloctag.$O\ mallocz.$O\ + netmkaddr.$O\ nrand.$O\ qlock.$O\ readn.$O\ rendez-$(SYSNAME).$O\ + sleep.$O\ strecpy.$O\ sysfatal.$O\ tas-$(OBJTYPE).$O\ @@ -28,7 +30,6 @@ OFILES=\ u32.$O\ u64.$O\ wait.$O\ - werrstr.$O\ HFILES=\ $(PLAN9)/include/lib9.h\ blob - e576b12bcfd98fde5c800ae68d3a43f4cdca2255 blob + 504ec6ec818671a27805fdc2c6b2e1946cf33cc5 --- src/lib9/errstr.c +++ src/lib9/errstr.c @@ -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); +} blob - 7fa1f2ea6dbcdb2dbfcbd9f4708be80fb9c3568c (mode 644) blob + /dev/null --- src/lib9/werrstr.c +++ /dev/null @@ -1,13 +0,0 @@ -#include - -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); -}