IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32272 for trunk/ippTools/src


Ignore:
Timestamp:
Sep 1, 2011, 8:01:45 AM (15 years ago)
Author:
bills
Message:

gather pending skycells from all labels and print them out together. Works around bug in pantasks

File:
1 edited

Legend:

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

    r31955 r32272  
    975975    psFree(where);
    976976
     977    psArray *allOutput = psArrayAllocEmpty(0);
    977978    // Now loop over the labels and query each individually
    978979    for (long i = 0; i < psArrayLength(labelOutput); i++) {
     
    10231024        long outputLength = psArrayLength(output);
    10241025        if (outputLength) {
    1025             // negative simple so the default is true
    1026             if (!ippdbPrintMetadatas(stdout, output, "warpPendingSkyCell", !simple)) {
    1027                 psError(PS_ERR_UNKNOWN, false, "failed to print array");
    1028                 psFree(output);
    1029                 return false;
     1026            for (int i = 0; i< outputLength; i++) {
     1027                psPtr ptr = output->data[i];
     1028                allOutput = psArrayAdd(allOutput, outputLength - i + 10, ptr);
     1029                if (!allOutput) {
     1030                    psError(PS_ERR_UNKNOWN, false, "failed to add element to array");
     1031                    return false;
     1032                }
    10301033            }
    10311034        } else {
     
    10441047        }
    10451048    }
     1049    long allLabelsLength = psArrayLength(allOutput);
     1050    if (allLabelsLength) {
     1051        if (!ippdbPrintMetadatas(stdout, allOutput, "warpPendingSkyCell", !simple)) {
     1052            psError(PS_ERR_UNKNOWN, false, "failed to print array");
     1053            psFree(allOutput);
     1054            return false;
     1055        }
     1056    }
     1057    psFree(allOutput);
    10461058    psFree(labelOutput);
    10471059    psFree(whereStr);
Note: See TracChangeset for help on using the changeset viewer.