/*CloseUnits -fclose all filies opened with punch command */ #include "cddefines.h" #include "pnunit.h" void CloseUnits() /*close all the units (left) open - Public funct */ { long i; /* flush ioQQQ */ fflush( ioQQQ ); /* close all punch units cloudy opened with punch command */ for( i=0; i < pnunit.npunch; i++ ) { /* test for optional continue keyword on command line */ if( !pnunit.lgPunContinue[pnunit.npunch] ) { /* continue key was not present, so close unit */ if( NULL != pnunit.ipPnunit[i]) { fclose( pnunit.ipPnunit[i] ); } /* set flag saying that this is now closed */ pnunit.lgUnitOpen[i] = FALSE; } } return; }