void CLE( void ) { time_t start; InitPurge(); OpenSrc(); if( CurrFile != NULL ) { StartCompile(); start = time( NULL ); Compile(); CompTime = difftime( time( NULL ), start ); FiniCompile(); Conclusion(); } else { // Consider: wfc /who what CloseErr(); } }
void OpenSrc( void ) { //======================= file_handle fp; char err_msg[ERR_BUFF_SIZE+1]; char bld_name[MAX_FILE+1]; bool erase_err; erase_err = ErrFile == NULL; SDInitAttr(); MakeName( SrcName, SrcExtn, bld_name ); fp = SDOpen( bld_name, READ_FILE ); if( fp != NULL ) { SrcInclude( bld_name ); CurrFile->fileptr = fp; } else { SDError( NULL, err_msg ); InfoError( SM_OPENING_FILE, bld_name, err_msg ); } if( erase_err ) { CloseErr(); Erase( ErrExtn ); } }
static void FiniCompile( void ) { SetLst( true ); // listing file on for statistics LFEndSrc(); CloseErr(); }