static char *signames[] = { "Sig0",
			    "SIGHUP",
			    "SIGINT",
			    "SIGQUIT",
			    "SIGILL",
			    "SIGTRAP",
			    "SIGIOT",
			    "SIGEMT",
			    "SIGFPE",
			    "SIGKILL",
			    "SIGBUS",
			    "SIGSEGV",
			    "SIGSYS",
			    "SIGPIPE",
			    "SIGALRM",
			    "SIGTERM",
			    "SIGURG",
			    "SIGSTOP",
			    "SIGTSTP",
			    "SIGCONT",
			    "SIGCHLD",
			    "SIGTTIN",
			    "SIGTTOU",
			    "SIGIO",
			    "SIGXCPU",
			    "SIGXFSZ",
			    "SIGVTALRM",
			    "SIGPROF",
			    "Sig28",
			    "Sig29",
			    "Sig30",
			    "Sig31" };
static char *sigmsgs[] = { "Signal 0",
			   "Hangup",
			   "Interrupt",
			   "Quit",
			   "Illegal instruction",
			   "Trace trap",
			   "IOT trap",
			   "Emulator trap",
			   "Floating-point exception",
			   "Killed",
			   "Bus error",
			   "Segmentation violation",
			   "Bad system call",
			   "Broken pipe",
			   "Alarm",
			   "Terminated",
			   "Urgent I/O",
			   "Stopped (signal)",
			   "Stopped",
			   "Continued",
			   "Child status change",
			   "Tty input",
			   "Tty output",
			   "I/O possible",
			   "CPU limit exceeded",
			   "File size limit exceeded",
			   "Virtual alarm",
			   "Profiling alarm",
			   "Signal 28",
			   "Signal 29",
			   "Signal 30",
			   "Signal 31" };

char *signal_name(sig)
int sig;
{
 if ((sig < 0) || (sig > (sizeof(signames)/sizeof(signames[0]))))
  { return(0);
  }
 return(signames[sig]);
}

char *signal_msg(sig)
int sig;
{
 if ((sig < 0) || (sig > (sizeof(signames)/sizeof(sigmsgs[0]))))
  { return(0);
  }
 return(sigmsgs[sig]);
}
