Changeset 29786
- Timestamp:
- Nov 16, 2010, 12:59:27 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20101103/Ohana/src/dvomerge/src
- Files:
-
- 3 edited
-
ReadDeleteList.c (modified) (1 diff)
-
dvorepairDeleteImageList.c (modified) (1 diff)
-
dvoverify.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101103/Ohana/src/dvomerge/src/ReadDeleteList.c
r29779 r29786 5 5 int j, index, Nindex, NINDEX, *indexList, Nline; 6 6 int Nstart, Nbytes, Nread, status; 7 char *c0, *c1, *space, * indexPoint, *buffer;7 char *c0, *c1, *space, *buffer; 8 8 9 char *indexPoint = NULL; 9 10 FILE *f = fopen (filename, "r"); 10 11 myAssert(f, "failed to open delete list"); -
branches/eam_branches/ipp-20101103/Ohana/src/dvomerge/src/dvorepairDeleteImageList.c
r29779 r29786 109 109 Dmin = +90.0; 110 110 Dmax = -90.0; 111 Qmin = 360.0; 112 Qmax = 0.0; 111 113 for (i = 0; i < NdeleteIDs; i++) { 112 114 index = deleteIDs[i]; -
branches/eam_branches/ipp-20101103/Ohana/src/dvomerge/src/dvoverify.c
r29785 r29786 9 9 10 10 int VerifyTableFile (char *filename); 11 12 # define DEBUG 0 11 13 12 14 int main (int argc, char **argv) { … … 79 81 if (!inlist[0].regions[i][0].table) continue; 80 82 81 sprintf (filename, "%s/%s.cpm", catdir, inlist[0].regions[i][0].name); 82 if (!VerifyTableFile (filename)) { 83 Nbad ++; 84 } 85 86 sprintf (filename, "%s/%s.cpm", catdir, inlist[0].regions[i][0].name); 83 // if (i % 1000 == 0) fprintf (stderr, "."); 84 85 sprintf (filename, "%s/%s.cpt", catdir, inlist[0].regions[i][0].name); 86 if (!VerifyTableFile (filename)) { 87 Nbad ++; 88 } 89 90 sprintf (filename, "%s/%s.cps", catdir, inlist[0].regions[i][0].name); 87 91 if (!VerifyTableFile (filename)) { 88 92 Nbad ++; … … 120 124 switch (errno) { 121 125 case ENOENT: 122 //fprintf (stderr, "file does not exist, skipping %s\n", filename);126 if (DEBUG) fprintf (stderr, "file does not exist, skipping %s\n", filename); 123 127 return TRUE; 124 128 case ENOMEM: … … 164 168 // scan all extentions 165 169 Nbytes = 0; 166 while (Nbytes > fileStats.st_size) { 170 if (DEBUG) fprintf (stderr, "sizes: ("OFF_T_FMT" vs "OFF_T_FMT")\n", Nbytes, fileStats.st_size); 171 while (Nbytes < fileStats.st_size) { 167 172 168 173 // Check on the PHU … … 175 180 // move to TBL header 176 181 Nbytes += header.datasize + gfits_data_size (&header); 182 if (DEBUG) fprintf (stderr, "sizes: ("OFF_T_FMT" vs "OFF_T_FMT")\n", Nbytes, fileStats.st_size); 177 183 if (Nbytes > fileStats.st_size) { 178 fprintf (stderr, "file is short ("OFF_T_FMT" vs "OFF_T_FMT") \n", Nbytes, fileStats.st_size);184 fprintf (stderr, "file is short ("OFF_T_FMT" vs "OFF_T_FMT"): %s\n", Nbytes, fileStats.st_size, filename); 179 185 gfits_free_header(&header); 180 186 fclose (file); … … 201 207 } 202 208 } 203 //fprintf (stderr, "file is good: %s\n", filename);209 if (DEBUG) fprintf (stderr, "file is good: %s\n", filename); 204 210 fclose (file); 205 211 return TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.
