File:  [MW Coherent from dump] / coherent / d / lib / libc / gen / perror.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:37 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * Print error messages based on value in `errno'.
 */

#include <stdio.h>

extern	int	errno;
extern	char	*sys_errlist[];
extern	int	sys_nerr;

perror(s)
register char *s;
{
	register char *es;

	if (errno < sys_nerr)
		es = sys_errlist[errno]; else
		es = "Bad error number";
	if (s != NULL) {
		fputs(s, stderr);
		fputs(": ", stderr);
	}
	fputs(es, stderr);
	fputs("\n", stderr);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.