void WriteErr( int errcode, va_list args ) { //============================================= // Write error message. char buffer[ERR_PREF_SIZE+ERR_BUFF_SIZE+1]; _AccessFIO(); // Before writing the error message, flush standard output files so that if // unit 6 is connected to the standard output device which has been // redirected to a file, the file gets flushed before the error message is // written. FlushStdUnit(); strcpy( buffer, ErrorPref ); BldErrCode( errcode, &buffer[ ERR_PREF_SIZE ] ); __BldErrMsg( errcode, &buffer[ERR_PREF_SIZE + ERR_CODE_SIZE], args ); if( __EnterWVIDEO( buffer ) ) { StdBuffer(); } else { StdBuffer(); StdWriteNL( buffer, strlen( buffer ) ); } ERR_HOOK( errcode, buffer ); StdFlush(); _ReleaseFIO(); }
void SetIOCB( void ) { //========================= RTSysInit(); _AccessFIO(); _RWD_XcptFlags |= XF_IO_INTERRUPTABLE; IOSysInit(); if( IOCB->flags & IOF_SETIOCB ) { _PartialReleaseFIO(); return; } if( IOCB->flags & IOF_ACTIVE ) { RTErr( IO_ACTIVE_ALREADY ); } IOCB->fileinfo = NULL; IOCB->set_flags = 0; IOCB->status = 0; IOCB->typ = 0; IOCB->flags = IOF_ACTIVE | IOF_SETIOCB; }
void Pause( string PGM *ptr ) { //================================ // Process a PAUSE statement. RTSysInit(); if( ptr != NULL ) { _AccessFIO(); // Before writing the error message, flush standard output files so that // if unit 6 is connected to the standard output device which has been // redirected to a file, the file gets flushed before the error message // is written. FlushStdUnit(); StdBuffer(); StdWrite( ptr->strptr, ptr->len ); StdFlush(); _ReleaseFIO(); } WaitForEnter(); }