File:  [Research Unix] / researchv10no / cmd / qsnap / iberr.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

#include	<stdio.h>

static char *iberrs[] =
{
	"No command byte",
	"CAC conflict",
	"not CAC",
	"not SAC",
	"IFC abort",
	"timeout",
	"bad function code",
	"TCT timeout",
	"no listeners",
	"bcr error",
	"no PP",
	"ir timeout",
	"ir next memory",
	"next memory",
	"bcr-bar error",
	"UNIBUS map",
	"open error",
	"unused",
	"unused",
	"bad ibup function code",
	"no device",
	"device not Listener",
	"device not Talker",
};

iberr(err, str)
	char *str;
{
	char *s, buf[256];
	extern int errno;

	if(err >= 0)
		s = "No error";
	else if((err < 0) && (err > -24))
		s = iberrs[-1-err];
	else if(err == -100)
		sprintf(s = buf, "error -100: errno=%d\n", errno);
	else
		sprintf(s = buf, "no message for error %d", err);
	printf("%d %s: %s\n", err, str, s);
}

unix.superglobalmegacorp.com

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