Changeset 35243
- Timestamp:
- Mar 6, 2013, 11:25:12 AM (13 years ago)
- Location:
- trunk/Ohana/src/delstar
- Files:
-
- 2 edited
-
include/delstar.h (modified) (1 diff)
-
src/delete_duplicate_images.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/delstar/include/delstar.h
r35237 r35243 120 120 int delete_duplicate_image_measures_catalog (Catalog *catalog, IndexArray *imageID); 121 121 122 IndexArray *find_duplicates (Image *image, off_t Nimage );122 IndexArray *find_duplicates (Image *image, off_t Nimage, off_t *Nduplicates); 123 123 IndexArray *make_index_array (Image *image, off_t Nimage, int mode); 124 124 -
trunk/Ohana/src/delstar/src/delete_duplicate_images.c
r35237 r35243 17 17 } 18 18 19 IndexArray *imageID = find_duplicates (image, Nimage); 19 off_t Nduplicates = 0; 20 IndexArray *imageID = find_duplicates (image, Nimage, &Nduplicates); 21 22 if (Nduplicates == 0) { 23 fprintf (stderr, "no duplicate images in this database, exiting\n"); 24 exit (0); 25 } 26 27 fprintf (stderr, "deleting measures for "OFF_T_FMT" duplicate images in this database\n", Nduplicates); 20 28 21 29 if (!IMAGE_ONLY) { … … 397 405 } 398 406 399 IndexArray *find_duplicates (Image *image, off_t Nimage ) {407 IndexArray *find_duplicates (Image *image, off_t Nimage, off_t *Nduplicates) { 400 408 401 409 off_t i, *Ndelete; … … 432 440 433 441 IndexArray *imageID = make_index_array (image, Nimage, IMAGE_ID); 442 443 off_t Ndup = 0; 434 444 435 445 // set imageID->value to TRUE for images we want to delete … … 447 457 imageID->value[Ni] = TRUE; 448 458 Ndelete[Nx] ++; 459 460 Ndup ++; 449 461 450 462 // mark the parentID for deletion as well.. … … 469 481 free (extID); 470 482 483 *Nduplicates = Ndup; 484 471 485 return imageID;; 472 486 }
Note:
See TracChangeset
for help on using the changeset viewer.
