tMove 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. - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 169aba14a4766b3d15695ef27681d0f1d04f8521
parent 8110278003252f8579d61cd99392801a1857cdc2
Author: rsc 
Date:   Tue, 14 Oct 2003 02:10:47 +0000

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.

Diffstat:
  M src/lib9/Makefile                   |       3 ++-
  M src/lib9/errstr.c                   |      12 ++++++++++++
  D src/lib9/werrstr.c                  |      13 -------------

3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/lib9/Makefile b/src/lib9/Makefile
t@@ -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\
t@@ -28,7 +30,6 @@ OFILES=\
         u32.$O\
         u64.$O\
         wait.$O\
-        werrstr.$O\
 
 HFILES=\
         $(PLAN9)/include/lib9.h\
diff --git a/src/lib9/errstr.c b/src/lib9/errstr.c
t@@ -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);
+}
diff --git a/src/lib9/werrstr.c b/src/lib9/werrstr.c
t@@ -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);
-}