home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
PSIGNAL.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
676b
|
27 lines
/* psignal: print an error message describing a signal */
/* this is very TOS specific!! */
/* Written by ERS and placed in the public domain */
/* check for valid prefix & changed fputs to low level write call (er) */
#include <signal.h>
#include <siglist.h>
#include <string.h>
#include "lib.h"
void
psignal(sig, prefix)
int sig;
const char *prefix;
{
_write(2, "\r\n", 2L);
if(prefix && *prefix) {
_write(2, prefix, (long)strlen(prefix));
_write(2, ": ", 2L);
}
if (sig > 0 && sig < NSIG)
_write(2, sys_siglist[sig], (long)strlen(sys_siglist[sig]));
else
_write(2, "unknown signal", 14L);
_write(2, "\r\n", 2L);
}