- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppTranslate/src/ppMops.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/ppTranslate/src/ppMops.c
r29565 r33415 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 91 68 92 psLibFinalize(); 93 94 fprintf (stderr, "found %d leaks at %s\n", 95 psMemCheckLeaks2 (0, 96 NULL, stdout, false, 500), "ppMops"); 69 97 70 98 return PS_EXIT_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.
