Changeset 25383 for trunk/psLib/src/fits/psFits.c
- Timestamp:
- Sep 15, 2009, 12:45:01 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psLib/src/fits/psFits.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap (added) merged: 25238,25241-25243,25246,25258-25267,25278,25302,25309-25312,25326-25329,25331-25339
- Property svn:mergeinfo changed
-
trunk/psLib/src/fits/psFits.c
r25049 r25383 344 344 // Therefore, we implement our own version of moving to an extension specified by name. The pure cfitsio 345 345 // version is used if "conventions.compression" handling is turned off in the psFits structure. 346 bool psFitsMoveExtName(const psFits* fits, 347 const char* extname) 346 static bool fitsMoveExtName(const psFits* fits, // FITS file 347 const char* extname, // Extension name 348 bool errors // Generate errors? 349 ) 348 350 { 349 351 PS_ASSERT_FITS_NON_NULL(fits, false); … … 356 358 // User wants to use cfitsio. Good luck to them! 357 359 if (fits_movnam_hdu(fits->fd, ANY_HDU, (char*)extname, 0, &status) != 0) { 358 psFitsError(status, true, _("Could not find HDU '%s'"), extname); 360 if (errors) { 361 psFitsError(status, true, _("Could not find HDU '%s'"), extname); 362 } 359 363 return false; 360 364 } … … 378 382 if (fits_movabs_hdu(fits->fd, i, &hdutype, &status)) { 379 383 // We've run off the end 380 psFitsError(status, true, _("Could not find HDU with %s = '%s'"), extword, extname); 384 if (errors) { 385 psFitsError(status, true, _("Could not find HDU with %s = '%s'"), extword, extname); 386 } 381 387 return false; 382 388 } … … 406 412 } 407 413 psAbort("Should never reach here."); 414 } 415 416 417 bool psFitsMoveExtName(const psFits* fits, const char* extname) 418 { 419 return fitsMoveExtName(fits, extname, true); 420 } 421 422 bool psFitsMoveExtNameClean(const psFits* fits, const char* extname) 423 { 424 return fitsMoveExtName(fits, extname, false); 408 425 } 409 426
Note:
See TracChangeset
for help on using the changeset viewer.
