From d997534f65903e8078efe2f8ceb19941692598f7 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 17 Jun 1998 14:34:13 +0000 Subject: Oops, forgot '%m'... --- lib/printf.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/printf.c') diff --git a/lib/printf.c b/lib/printf.c index dc9ea1b..21453dd 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -9,6 +9,9 @@ #include "nest/bird.h" #include "string.h" +#include +#include + /* we use this so that we can do without the ctype library */ #define is_digit(c) ((c) >= '0' && (c) <= '9') @@ -184,11 +187,15 @@ int bvsprintf(char *buf, const char *fmt, va_list args) *str++ = ' '; continue; + case 'm': + s = strerror(errno); + goto str; case 's': s = va_arg(args, char *); if (!s) s = ""; + str: len = strlen(s); if (precision >= 0 && len > precision) len = precision; -- cgit v1.2.3