Changeset 31100
- Timestamp:
- Mar 30, 2011, 1:26:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20110218/Ohana/src/dvomerge/src/dvoverify.c
- Property svn:mergeinfo set to
r30615 r31100 14 14 15 15 int VERBOSE; 16 int CHECKSORTED; 17 int NNotSorted = 0; 16 18 17 19 int main (int argc, char **argv) { … … 31 33 remove_argument (N, &argc, argv); 32 34 } 35 if ((N = get_argument (argc, argv, "-s"))) { 36 CHECKSORTED = TRUE; 37 remove_argument (N, &argc, argv); 38 } 39 33 40 34 41 // restrict to a portion of the sky … … 50 57 51 58 if (argc != 2) { 52 fprintf (stderr, "USAGE: dvoverify (catdir) [-region Rmin Rmax Dmin Dmax] \n");59 fprintf (stderr, "USAGE: dvoverify (catdir) [-region Rmin Rmax Dmin Dmax] [-v -s]\n\n -v = verbose \n -s = checks if sorted, return error if not\n"); 53 60 fprintf (stderr, " catdir : database of interest\n"); 54 61 exit (2); … … 89 96 for (i = 0; i < inlist[0].Nregions; i++) { 90 97 if (!inlist[0].regions[i][0].table) continue; 91 98 if ((NNotSorted > 0) && CHECKSORTED) continue; 92 99 if (i % 1000 == 0) fprintf (stderr, "."); 93 100 … … 115 122 fprintf (stderr, "ERROR: %d files are bad\n", Nbad); 116 123 exit (1); 124 } 125 if ((NNotSorted > 0) && CHECKSORTED) { 126 fprintf (stderr, "ERROR: files are not sorted\n"); 127 exit (1); 117 128 } 118 129 … … 267 278 dvo_catalog_unlock (&catalog); 268 279 dvo_catalog_free (&catalog); 280 NNotSorted++; 281 if (VERBOSE) fprintf (stderr, "file is not sorted: %s\n", filename); 269 282 return TRUE; 270 283 }
Note:
See TracChangeset
for help on using the changeset viewer.
