2 * Replace %m by system error message.
4 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
8 static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
15 #ifndef SYS_ERRLIST_DEFINED
16 extern char *sys_errlist[];
22 char *percent_m(obuf, ibuf)
30 if (*cp == '%' && cp[1] == 'm') {
31 if (errno < sys_nerr && errno > 0) {
32 strcpy(bp, sys_errlist[errno]);
34 sprintf(bp, "Unknown error %d", errno);