/*
 * Print the error indicated
 * in the cerror cell.
 */

extern int	errno;
extern int	sys_nerr;
extern char	*sys_errlist[];
perror(s)
	char *s;
{
	write(2,s,strlen(s));
	write(2,": ",2);
	if (errno >= 0 && errno < sys_nerr)
	    write(2,sys_errlist[errno],strlen(sys_errlist[errno]));
	else
	    write(2,"Unknown error",13);
	write(2,"\n",1);
}
