#include #include #include #include #include #include /* report error code and description */ GOTO errvdesc(int code,const char *fmt,...) { static char proc[]="perror"; /* error reporting program */ register char *parm = ""; char desc[512]; char buf[10]; if (errenv) { if (fork()) longjmp(errenv->buf,code); parm = "N"; /* suppress message on terminal when trapped */ } if (fmt) { va_list args; va_start(args,fmt); vsprintf(desc,fmt,args); va_end(args); } else strcpy(desc,"unknown error"); execlp(proc,proc,ltoa(code,buf,sizeof buf),bmsprog,desc,parm,0); /* Do NOT call exit(). It will screw up BTAS among other things. */ _exit(1); }