2 * Replace %m by system error message.
4 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
11 #ifndef SYS_ERRLIST_DEFINED
12 extern char *sys_errlist
[];
18 char *percent_m(obuf
, ibuf
)
25 while ((*bp
= *cp
) != 0)
26 if (*cp
== '%' && cp
[1] == 'm') {
27 if (errno
< sys_nerr
&& errno
> 0) {
28 strcpy(bp
, sys_errlist
[errno
]);
30 sprintf(bp
, "Unknown error %d", errno
);