Commit e776fecd authored by Niels Möller's avatar Niels Möller
Browse files

(werror_vformat): Added %e specifier.

Rev: src/werror.c:1.66
Rev: src/werror.h:1.31
parent b452d370
......@@ -534,6 +534,16 @@ werror_vformat(const char *f, va_list args)
else
werror_write(strlen(s), s);
break;
}
case 'e':
{ /* errno specifier */
int e = va_arg(args, int);
werror_cstring("(errno = ");
werror_decimal(e);
werror_cstring("): ");
werror_cstring(STRERROR(errno));
break;
}
default:
......
......@@ -55,6 +55,7 @@ void set_error_syslog(const char *id);
/* Format specifiers:
*
* %% %-character
* %e an errno value, formated numerically and with strerror
* %i UINT32
* %c int, interpreted as a single character to output
* %n mpz_t
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment