V5/usr/source/s4/perror.c

Compare this file to the similar file:
Show the results in this format:

int	errno;
int	sys_nerr;
char	*sys_errlist[];
perror(s)
char *s;
{
	char *c;

	c = "Unknown error";
	if(errno < sys_nerr)
		c = sys_errlist[errno];
	if(*s == '\0')
		printf("%s", c); else
		printf("%s: %s\n", s, c);
}