"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "eval_f.c" between
cfitsio-3.49.tar.gz and cfitsio-4.0.0.tar.gz

About: CFITSIO is a library of C and Fortran subroutines for reading and writing data files in the FITS (Flexible Image Transport System) data format.

eval_f.c  (cfitsio-3.49):eval_f.c  (cfitsio-4.0.0)
skipping to change at line 643 skipping to change at line 643
*status = 0; *status = 0;
if( gParse.hdutype==BINARY_TBL ) { if( gParse.hdutype==BINARY_TBL ) {
LONGLONG nullVal=0; LONGLONG nullVal=0;
fits_binary_tform( parInfo, &typecode, &repeat, &width, status ); fits_binary_tform( parInfo, &typecode, &repeat, &width, status );
if( typecode==TBYTE ) if( typecode==TBYTE )
nullVal = UCHAR_MAX; nullVal = UCHAR_MAX;
else if( typecode==TSHORT ) else if( typecode==TSHORT )
nullVal = SHRT_MIN; nullVal = SHRT_MIN;
else if( typecode==TINT ) else if( typecode==TINT )
nullVal = INT_MIN; nullVal = INT_MIN;
else if( typecode==TLONG ) else if( typecode==TLONG ) {
nullVal = LONG_MIN; if (sizeof(long) == 8 && sizeof(int) == 4)
nullVal = INT_MIN;
else
nullVal = LONG_MIN;
}
else if( typecode==TLONGLONG ) else if( typecode==TLONGLONG )
nullVal = LONGLONG_MIN; nullVal = LONGLONG_MIN;
if( nullVal ) { if( nullVal ) {
ffpkyj( outfptr, nullKwd, nullVal, "Null value", status ); ffpkyj( outfptr, nullKwd, nullVal, "Null value", status );
fits_set_btblnull( outfptr, colNo, nullVal, status ); fits_set_btblnull( outfptr, colNo, nullVal, status );
newNullKwd = 1; newNullKwd = 1;
} }
} else if( gParse.hdutype==ASCII_TBL ) { } else if( gParse.hdutype==ASCII_TBL ) {
ffpkys( outfptr, nullKwd, "NULL", "Null value string", status ); ffpkys( outfptr, nullKwd, "NULL", "Null value string", status );
skipping to change at line 2746 skipping to change at line 2750
if (!filter->blank) { if (!filter->blank) {
int tstatus = 0; int tstatus = 0;
if (fits_read_key_lng(infptr, "BLANK", &nullVal, 0, &tstatus)) { if (fits_read_key_lng(infptr, "BLANK", &nullVal, 0, &tstatus)) {
writeBlankKwd = 1; writeBlankKwd = 1;
if (bitpix == BYTE_IMG) if (bitpix == BYTE_IMG)
nullVal = UCHAR_MAX; nullVal = UCHAR_MAX;
else if (bitpix == SHORT_IMG) else if (bitpix == SHORT_IMG)
nullVal = SHRT_MIN; nullVal = SHRT_MIN;
else if (bitpix == LONG_IMG) else if (bitpix == LONG_IMG) {
nullVal = LONG_MIN; if (sizeof(long) == 8 && sizeof(int) == 4)
nullVal = INT_MIN;
else
nullVal = LONG_MIN;
}
else else
printf("unhandled positive output BITPIX %d\n", bitpix); printf("unhandled positive output BITPIX %d\n", bitpix);
} }
filter->blank = nullVal; filter->blank = nullVal;
} }
fits_set_imgnull(outfptr, filter->blank, status); fits_set_imgnull(outfptr, filter->blank, status);
if (DEBUG_PIXFILTER) if (DEBUG_PIXFILTER)
printf("using blank %ld\n", nullVal); printf("using blank %ld\n", nullVal);
 End of changes. 2 change blocks. 
4 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)