#include #include #include #include #ifndef NSIG #define NSIG _NSIG #endif /* $Id$ */ /* Trap handling */ int _trpline; /* BASIC return label */ jmp_buf trpbuf; void _trpset(int nr) { /*debug printf("trap set to %d\n",nr);*/ _trpline=nr; } void _trpfatal(int i) { extern int _errsym,_erlsym; _errsym= i; _setline(); if( _trpline == 0) printf("LINE %d: FATAL ERROR: trap %d\n",_erlsym,i); #ifdef DEBUG printf("trap occurred %d return %d\n",i,_trpline); #endif _trap(); } void _ini_trp(void) { /* initialize trap routines */ int i; for(i=0;i