home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
OS9_Unix.lzh
/
RSHSRC
/
perror.c
< prev
next >
Wrap
Text File
|
1992-09-01
|
7KB
|
276 lines
/* perror, sys_errlist and sys_nerr for os9/68k */
#include <stdio.h>
extern int errno;
int sys_nerr = 256;
char *sys_errlist[256] = {
"error 0",
"error 1",
/* 000:002 */ "keyboard quit",
/* 000:003 */ "keyboard interrupt",
"error 4",
"error 5",
"error 6",
"error 7",
"error 8",
"error 9",
"error 10",
"error 11",
"error 12",
"error 13",
"error 14",
"error 15",
"error 16",
"error 17",
"error 18",
"error 19",
"error 20",
"error 21",
"error 22",
"error 23",
"error 24",
"error 25",
"error 26",
"error 27",
"error 28",
"error 29",
"error 30",
"error 31",
"error 32",
"error 33",
"error 34",
"error 35",
"error 36",
"error 37",
"error 38",
"error 39",
"error 40",
"error 41",
"error 42",
"error 43",
"error 44",
"error 45",
"error 46",
"error 47",
"error 48",
"error 49",
"error 50",
"error 51",
"error 52",
"error 53",
"error 54",
"error 55",
"error 56",
"error 57",
"error 58",
"error 59",
"error 60",
"error 61",
"error 62",
"error 63",
/* 000:064 */ "illegal function code (math)",
/* 000:065 */ "ascii->numeric format conversion error (math)",
/* 000:066 */ "not a number (math)",
/* 000:067 */ "illegal argument (usually math)",
"error 68",
"error 69",
"error 70",
"error 71",
"error 72",
"error 73",
"error 74",
"error 75",
"error 76",
"error 77",
"error 78",
"error 79",
"error 80",
"error 81",
"error 82",
"error 83",
"error 84",
"error 85",
"error 86",
"error 87",
"error 88",
"error 89",
"error 90",
"error 91",
"error 92",
"error 93",
"error 94",
"error 95",
"error 96",
"error 97",
"error 98",
"error 99",
"error 100",
"error 101",
/* 000:102 */ "bus trap",
/* 000:103 */ "address trap",
/* 000:104 */ "illegal instruction",
/* 000:105 */ "divide by zero",
/* 000:106 */ "\"chk\" instruction trap",
/* 000:107 */ "\"trapv\" instruction trap",
/* 000:108 */ "privileged instruction",
/* 000:109 */ "trace exception",
/* 000:110 */ "illegal instruction (1010)",
/* 000:111 */ "illegal instruction (1111)",
/* 000:112 */ "exception 12",
/* 000:113 */ "coprocessor protocol violation",
/* 000:114 */ "system stack frame format error",
/* 000:115 */ "uninitialized interrupt",
/* 000:116 */ "exception 16",
/* 000:117 */ "exception 17",
/* 000:118 */ "exception 18",
/* 000:119 */ "exception 19",
/* 000:120 */ "exception 20",
/* 000:121 */ "exception 21",
/* 000:122 */ "exception 22",
/* 000:123 */ "exception 23",
/* 000:124 */ "spurious interrupt",
"error 125",
"error 126",
"error 127",
"error 128",
"error 129",
"error 130",
"error 131",
"error 132",
/* 000:133 */ "an uninitialized user TRAP (1-15) was executed",
"error 134",
"error 135",
"error 136",
"error 137",
"error 138",
"error 139",
"error 140",
"error 141",
"error 142",
"error 143",
"error 144",
"error 145",
"error 146",
"error 147",
/* 000:148 */ "fpcp unordered condition",
/* 000:149 */ "fpcp inexact result",
/* 000:150 */ "fpcp divide by zero",
/* 000:151 */ "fpcp underflow",
/* 000:152 */ "fpcp operand error",
/* 000:153 */ "fpcp overflow",
/* 000:154 */ "fpcp not a number",
/* 000:155 */ "exception 55",
/* 000:156 */ "pmmu configuration",
/* 000:157 */ "pmmu illegal operation",
/* 000:158 */ "pmmu access level violation",
/* 000:159 */ "exception 59",
/* 000:160 */ "exception 60",
/* 000:161 */ "exception 61",
/* 000:162 */ "exception 62",
/* 000:163 */ "exception 63",
/* 000:164 */ "no permission",
/* 000:165 */ "arguments to F$ChkNam didn't match",
/* 000:166 */ "system stack overflow",
/* 000:167 */ "invalid event ID number",
/* 000:168 */ "event not found",
/* 000:169 */ "the event is busy",
/* 000:170 */ "impossible event parameters",
/* 000:171 */ "system data structures have been damaged",
/* 000:172 */ "module revision is incompatable with operating system",
/* 000:173 */ "path became lost because network node was down",
/* 000:174 */ "bad disk partition, or no active partition",
"error 175",
"error 176",
"error 177",
"error 178",
"error 179",
"error 180",
"error 181",
"error 182",
"error 183",
"error 184",
"error 185",
"error 186",
"error 187",
"error 188",
"error 189",
"error 190",
"error 191",
"error 192",
"error 193",
"error 194",
"error 195",
"error 196",
"error 197",
"error 198",
"error 199",
/* 000:200 */ "the path table is full",
/* 000:201 */ "bad path number",
/* 000:202 */ "system IRQ table is full",
/* 000:203 */ "bad I/O mode",
/* 000:204 */ "system device table is full",
/* 000:205 */ "bad module header",
/* 000:206 */ "system module directory is full",
/* 000:207 */ "memory full",
/* 000:208 */ "unknown service code ",
/* 000:209 */ "non-sharable module is busy",
/* 000:210 */ "bad page address",
/* 000:211 */ "end of file",
/* 000:212 */ "IRQ vector is busy",
/* 000:213 */ "non-existing segment",
/* 000:214 */ "file not accessible",
/* 000:215 */ "bad pathlist",
/* 000:216 */ "file not found",
/* 000:217 */ "file segment list is full",
/* 000:218 */ "creating an existing file",
/* 000:219 */ "illegal memory block address",
/* 000:220 */ "modem data carrier lost",
/* 000:221 */ "module not found",
/* 000:222 */ "system clock not running",
/* 000:223 */ "deleting stack memory",
/* 000:224 */ "illegal process ID",
/* 000:225 */ "bad IRQ parameter",
/* 000:226 */ "no children",
/* 000:227 */ "invalid trap number",
/* 000:228 */ "process has aborted",
/* 000:229 */ "system process table is full",
/* 000:230 */ "illegal fork parameter",
/* 000:231 */ "known module",
/* 000:232 */ "bad module CRC",
/* 000:233 */ "unprocessed signal pending",
/* 000:234 */ "non executable module",
/* 000:235 */ "bad name",
/* 000:236 */ "bad module header parity",
/* 000:237 */ "no RAM available",
/* 000:238 */ "directory is not empty",
/* 000:239 */ "no available task number",
/* 000:240 */ "illegal unit (drive) number",
/* 000:241 */ "bad sector number",
/* 000:242 */ "media is write protected",
/* 000:243 */ "I/O error - bad check sum",
/* 000:244 */ "read error",
/* 000:245 */ "write error",
/* 000:246 */ "device not ready",
/* 000:247 */ "seek error",
/* 000:248 */ "media full",
/* 000:249 */ "incompatable media",
/* 000:250 */ "device busy",
/* 000:251 */ "disk media has changed",
/* 000:252 */ "record is busy",
/* 000:253 */ "non-sharable file/device is busy",
/* 000:254 */ "I/O deadlock error",
/* 000:255 */ "device is format protected",
};
perror(s)
register char *s;
{
if(s && *s) {
fprintf(stderr, "%s: %s\n", s, sys_errlist[errno&0xff]);
} else {
fprintf(stderr, "%s\n", sys_errlist[errno&0xff]);
}
}