Changeset 1623
- Timestamp:
- 12/07/07 06:50:47 (9 months ago)
- Location:
- trunk/source
- Files:
-
- 5 modified
-
cddrive.cpp (modified) (1 diff)
-
cdinit.cpp (modified) (1 diff)
-
cloudy.cpp (modified) (1 diff)
-
parse.h (modified) (1 diff)
-
parse_punch.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/cddrive.cpp
r1557 r1623 2122 2122 DEBUG_ENTRY( "cdClosePunchFiles()" ); 2123 2123 2124 ClosePunchFiles( );2124 ClosePunchFiles( true ); 2125 2125 return; 2126 2126 } -
trunk/source/cdinit.cpp
r1557 r1623 254 254 255 255 /* close any open units */ 256 ClosePunchFiles( );256 ClosePunchFiles( true ); 257 257 258 258 /* this routine must be called upon exit or machine will appear to "hang", -
trunk/source/cloudy.cpp
r1557 r1623 300 300 } 301 301 302 ClosePunchFiles( );302 ClosePunchFiles( false ); 303 303 304 304 /* this checks that various parts of the code worked properly */ -
trunk/source/parse.h
r1576 r1623 38 38 void PunchFilesInit(void); 39 39 40 /**close all open punch files */ 41 void ClosePunchFiles(void); 40 /**close all open punch files 41 \param lgFinal - close ALL files, regardless of "no clobber" status 42 */ 43 void ClosePunchFiles( bool lgFinal ); 42 44 43 45 /**ParseAge - parse the age command */ -
trunk/source/parse_punch.cpp
r1618 r1623 2510 2510 * from cloudy before returning 2511 2511 * NB - KEEP THIS ROUTINE SYNCHED UP WITH THE PREVIOUS ONE, PunchFilesInit */ 2512 void ClosePunchFiles( void)2512 void ClosePunchFiles( bool lgFinal ) 2513 2513 { 2514 2514 long int i; … … 2521 2521 for( i=0; i < punch.npunch; i++ ) 2522 2522 { 2523 if( punch.ipPnunit[i] != NULL && !lgNoClobber[i] ) 2524 { 2523 /* if lgFinal is true, we close everything, no matter what. 2524 * this means ignoring "no clobber" options */ 2525 if( punch.ipPnunit[i] != NULL && ( !lgNoClobber[i] || lgFinal ) ) 2526 { 2527 /* Test that any FITS files are the right size! */ 2528 if( punch.lgFITS[i] ) 2529 { 2530 /* \todo 2 This overflows for file sizes larger (in bytes) than 2531 * a long int can represent (about 2GB on most 2007 systems) */ 2532 fseek(punch.ipPnunit[i], 0, SEEK_END); 2533 long file_size = ftell(punch.ipPnunit[i]); 2534 if( file_size%2880 ) 2535 { 2536 fprintf( ioQQQ, " PROBLEM FITS file is wrong size!\n" ); 2537 } 2538 } 2539 2525 2540 fclose( punch.ipPnunit[i] ); 2526 2541 punch.ipPnunit[i] = NULL;
