IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28508


Ignore:
Timestamp:
Jun 25, 2010, 2:28:23 PM (16 years ago)
Author:
Paul Price
Message:

Backporting fix to allow empty header to be a FITS table.

Location:
tags/ipp-20100623
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20100623

  • tags/ipp-20100623/Ohana

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/ipp-20100623/ippMonitor

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/ipp-20100623/ippTools/share

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/ipp-20100623/psLib/src/fits/psFitsTable.c

    r28216 r28508  
    6767        return false;
    6868    }
     69    if (hdutype == IMAGE_HDU) {
     70        // It could be an empty table
     71        long size = 0;                  // Size of 'table'
     72        if (fits_get_num_rows(fits->fd, &size, &status)) {
     73            psFitsError(status, true, "Unable to determine size of table.");
     74            return false;
     75        }
     76        if (size != 0) {
     77            psFitsError(PS_ERR_BAD_FITS, true, "Current FITS HDU is not a table.");
     78            return false;
     79        }
     80    }
    6981    if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) {
    70         psError(PS_ERR_IO, true, _("Current FITS HDU is not a table."));
     82        psError(PS_ERR_BAD_FITS, true, _("Current FITS HDU is not a table."));
    7183        return false;
    7284    }
  • tags/ipp-20100623/psModules

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/ipp-20100623/psphot

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.