Changeset 32406 for trunk/ppTranslate/src/ppMops.c
- Timestamp:
- Sep 15, 2011, 4:50:36 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ppTranslate/src/ppMops.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppTranslate/src/ppMops.c
r32176 r32406 3 3 4 4 #include "ppMops.h" 5 6 void test() 7 { 8 psMetadata *md = psMetadataAlloc(); 9 10 psVector *vec = psVectorAlloc(42, PS_TYPE_S32); 11 12 psMetadataAddVector(md, PS_LIST_TAIL, "TEST", 0, NULL, vec); 13 14 psFree(vec); 15 psFree(md); 16 17 psLibFinalize(); 18 19 fprintf (stderr, "found %d leaks at %s\n", 20 psMemCheckLeaks2 (0, 21 NULL, stdout, false, 500), "ppMops"); 22 23 exit(0); 24 } 5 25 6 26 /* … … 39 59 psLibInit(NULL); 40 60 61 // test(); 62 41 63 ppMopsArguments *args = ppMopsArgumentsParse(argc, argv); // Parsed arguments 42 64 if (!args) { … … 45 67 } 46 68 69 47 70 psArray *detections = ppMopsRead(args); // Detections from each input 48 71 if (!detections) { … … 51 74 } 52 75 53 ppMopsDetections *merged = ppMopsMerge(detections); // Merged detections 54 psFree(detections); 55 if (!merged) { 76 if (!ppMopsPurgeDuplicates(detections)) { 56 77 psErrorStackPrint(stderr, "Unable to merge detections"); 57 78 exit(PS_EXIT_SYS_ERROR); 58 79 } 59 80 60 if (!ppMopsWrite( merged, args)) {81 if (!ppMopsWrite(detections, args)) { 61 82 psErrorStackPrint(stderr, "Unable to write detections"); 62 83 exit(PS_EXIT_SYS_ERROR); 63 84 } 64 85 65 psFree(merged); 86 for (int i = 0; i < detections->n; i++) { 87 psFree(detections->data[i]); 88 } 89 psFree(detections); 66 90 psFree(args); 67 psFree(detections);68 91 69 92 psLibFinalize();
Note:
See TracChangeset
for help on using the changeset viewer.
