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
/
test.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-30
|
400b
|
26 lines
#include <errno.h>
#include <stdio.h>
main()
{
int cc, catch();
char cha;
cc==EAGAIN;
cc=ENOTDIR;
intercept(catch);
fprintf(stderr,"Test program via error channel\n");
fprintf(stdout,"Test prog via stdout - type input\n");
while( (cc=read(0,&cha,1)) == 1){
_errmsg(0,"read %c (0x%x)\l",cha, (int) cha);
}
exit(errno);
}
catch(code)
int code;
{
_errmsg(0,"test caught %d\n",code);
}