IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2006, 5:05:37 PM (20 years ago)
Author:
jhoblitt
Message:

add -pending -simple
fix a memory leak in -pending

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pxframes.c

    r8175 r8187  
    5151    PS_ASSERT_PTR_NON_NULL(frames, false); \
    5252\
    53     psMetadata *output = psMetadataAlloc(); \
     53    bool simple = false; \
     54    { \
     55        bool status = false; \
     56        simple = psMetadataLookupBool(&status, config->args, "-simple"); \
     57        if (!status) { \
     58            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -simple"); \
     59            return false; \
     60        } \
     61    } \
    5462\
    5563    for (long i = 0; i < psArrayLength(frames); i++) { \
     
    5866        PS_ASSERT_PTR_NON_NULL(frame->images, false); \
    5967\
    60         for (long j = 0; j < psArrayLength(frame->images); j++) { \
    61             imfiletype##Row *image = frame->images->data[j]; \
    62             psMetadata *md = imfiletype##MetadataFromObject(image); \
    63             psMetadataAddMetadata(output, PS_LIST_TAIL, #imfiletype,  PS_META_DUPLICATE_OK, NULL, md); \
    64             psFree(md); \
     68        if (!imfiletype##PrintObjects(stdout, frame->images, !simple)) { \
     69            psError(PS_ERR_UNKNOWN, false, "failed to print array"); \
     70            return false; \
    6571        } \
    6672    } \
    67 \
    68     psString str = psMetadataConfigFormat(output); \
    69     psFree(output); \
    70     fprintf(stream, "%s\n", str); \
    71     psFree(str); \
     73    \
    7274\
    7375    return true; \
Note: See TracChangeset for help on using the changeset viewer.