IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31256


Ignore:
Timestamp:
Apr 10, 2011, 10:16:41 AM (15 years ago)
Author:
eugene
Message:

report on failed extensions, but only warn for files with extra cruft after last table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110404/Ohana/src/dvomerge/src/dvoverify.c

    r31160 r31256  
    148148int VerifyTableFile (char *filename) {
    149149
    150   int status;
     150  int status, Next;
    151151  off_t Nbytes;
    152152  Header header;
     
    205205  // scan all extentions
    206206  Nbytes = 0;
     207  Next = -1;
    207208  if (DEBUG) fprintf (stderr, "sizes: ("OFF_T_FMT" vs "OFF_T_FMT")\n", Nbytes, fileStats.st_size);
    208209  while (Nbytes < fileStats.st_size) {
     
    210211    // Check on the PHU
    211212    if (!gfits_fread_header (file, &header)) {
    212       fprintf (stderr, "unable to read PHU header for %s\n", filename);
     213      if (Next == -1) {
     214        fprintf (stderr, "unable to read PHU header for %s\n", filename);
     215      } else {
     216        fprintf (stderr, "unable to read header for %s, extension %d (or file has excess bytes)\n", filename, Next);
     217      }
    213218      fclose(file);
    214219      return (FALSE);
     
    243248      }
    244249    }
     250    Next ++;
    245251  }
    246252  if (DEBUG) fprintf (stderr, "file is good: %s\n", filename);
Note: See TracChangeset for help on using the changeset viewer.