IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9735 for trunk/ippTools/src


Ignore:
Timestamp:
Oct 24, 2006, 2:11:38 PM (20 years ago)
Author:
Paul Price
Message:

Changed definition of psArrayAlloc

Location:
trunk/ippTools/src
Files:
10 edited

Legend:

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

    r9711 r9735  
    278278        }
    279279    }
    280    
     280
    281281    psTime *use_begin = NULL;
    282282    {
     
    397397
    398398    // create new detInputExp row(s) from the rawDetrendExp row(s)
    399     psArray *inputExps = psArrayAlloc(psArrayLength(detrendExps));
     399    psArray *inputExps = psArrayAllocEmpty(psArrayLength(detrendExps));
    400400    for (long i = 0; i < psArrayLength(detrendExps); i++) {
    401401        detInputExpRow *inputExp = rawDetrenTodetInputExpRow(
     
    646646        }
    647647    }
    648    
     648
    649649    psTime *use_begin = NULL;
    650650    {
     
    714714
    715715    // create new detInputExp row(s) from the rawDetrendExp row(s)
    716     psArray *inputExps = psArrayAlloc(psArrayLength(detrendExps));
     716    psArray *inputExps = psArrayAllocEmpty(psArrayLength(detrendExps));
    717717    for (long i = 0; i < psArrayLength(detrendExps); i++) {
    718718        detInputExpRow *inputExp = rawDetrenTodetInputExpRow(
     
    45554555    psListIterator *iter = psListIteratorAlloc(exp_tag_list, 0, false);
    45564556    psMetadataItem *mItem = NULL;
    4557     psArray *newInputExps = psArrayAlloc(psListLength(exp_tag_list));
     4557    psArray *newInputExps = psArrayAllocEmpty(psListLength(exp_tag_list));
    45584558    while ((mItem = psListGetAndIncrement(iter))) {
    45594559        detInputExpRow *inputExp = psHashLookup(valid_exp_tags,
  • trunk/ippTools/src/p2insertPendingFrames.c

    r9392 r9735  
    6666        );
    6767
    68         psArray *pendingImages = psArrayAlloc(rawFrame->images->n);
     68        psArray *pendingImages = psArrayAllocEmpty(rawFrame->images->n);
    6969        for (long j = 0; j < rawFrame->images->n; j++) {
    7070            rawImfileRow *rawImage = rawFrame->images->data[j];
     
    8080            psArrayAdd(pendingImages, 100, pendingImage);
    8181        }
    82        
     82
    8383        if (!p2PendingExpInsertObject(config->dbh, pendingExposure)) {
    8484            psError(PS_ERR_UNKNOWN, false, "dbh access failed");
  • trunk/ippTools/src/p2pendingToDone.c

    r9392 r9735  
    2929    PS_ASSERT_PTR_NON_NULL(pendingFrames, NULL);
    3030
    31     psArray *doneFrames = psArrayAlloc(pendingFrames->n);
     31    psArray *doneFrames = psArrayAllocEmpty(pendingFrames->n);
    3232
    3333    for (long i = 0; i < pendingFrames->n; i++) {
     
    4242        );
    4343
    44         psArray *doneImages = psArrayAlloc(pendingFrame->images->n);
     44        psArray *doneImages = psArrayAllocEmpty(pendingFrame->images->n);
    4545        for (long j = 0; j < pendingFrame->images->n; j++) {
    4646            p2PendingImfileRow *pendingImage = pendingFrame->images->data[j];
  • trunk/ippTools/src/p2rawToPending.c

    r9392 r9735  
    2929    PS_ASSERT_PTR_NON_NULL(rawFrames, NULL);
    3030
    31     psArray *pendingFrames = psArrayAlloc(rawFrames->n);
     31    psArray *pendingFrames = psArrayAllocEmpty(rawFrames->n);
    3232
    3333    for (long i = 0; i < rawFrames->n; i++) {
     
    5151        );
    5252
    53         psArray *pendingImages = psArrayAlloc(rawFrame->images->n);
     53        psArray *pendingImages = psArrayAllocEmpty(rawFrame->images->n);
    5454        for (long j = 0; j < rawFrame->images->n; j++) {
    5555            rawImfileRow *rawImage = rawFrame->images->data[j];
  • trunk/ippTools/src/p2searchDoneFrames.c

    r9392 r9735  
    3737
    3838    // output array of rawScienceFrame
    39     psArray *frames = psArrayAlloc(exposures->n);
     39    psArray *frames = psArrayAllocEmpty(exposures->n);
    4040
    4141    for (long i = 0; i < exposures->n; i++) {
     
    6161
    6262    return frames;
    63 } 
     63}
  • trunk/ippTools/src/p2searchPendingFrames.c

    r9392 r9735  
    3737
    3838    // output array of rawSet
    39     psArray *frames = psArrayAlloc(exposures->n);
     39    psArray *frames = psArrayAllocEmpty(exposures->n);
    4040
    4141    // 'where' to select each exposure
     
    5555
    5656    return frames;
    57 } 
     57}
    5858
    5959// XXX EAM : this may be more efficient if we just select all p2PendingImages
     
    9191    psMetadata *where = NULL;
    9292    if (exp_tag) {
    93         where = psMetadataAlloc(); 
     93        where = psMetadataAlloc();
    9494        if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_tag", 0, "==", exp_tag)) {
    9595            psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag");
     
    9797            return false;
    9898        }
    99     } 
     99    }
    100100    psArray *exps = p2PendingExpSelectRowObjects(config->dbh, where, MAX_ROWS);
    101101    psFree(where);
  • trunk/ippTools/src/pxframes.c

    r9392 r9735  
    9090\
    9191    return true; \
    92 } 
     92}
    9393
    9494PX_FRAME_PRINT(pzPendingFrame, pzPendingImfile);
     
    111111    } \
    112112 \
    113     psArray *allFrames = psArrayAlloc(psArrayLength(exposures)); \
     113    psArray *allFrames = psArrayAllocEmpty(psArrayLength(exposures)); \
    114114 \
    115115    for (long i = 0; i < psArrayLength(exposures); i++) { \
     
    143143 \
    144144    return allFrames; \
    145 } 
     145}
    146146
    147147PX_FRAME_SEARCH(pzPendingFrame, pzPendingExp, pzPendingImfile, exp_id);
     
    177177
    178178/*
    179 rawDetrendFrame *newToRawDetrendFrame(pxConfig *config, newFrame *newFrame) 
     179rawDetrendFrame *newToRawDetrendFrame(pxConfig *config, newFrame *newFrame)
    180180{
    181181    newExpRow       *newExp = NULL;
     
    187187
    188188    psArray *newImages = newFrame->images;
    189     psArray *rawImages = psArrayAlloc(psArrayLength(newImages));
     189    psArray *rawImages = psArrayAllocEmpty(psArrayLength(newImages));
    190190    for (long i = 0; i < psArrayLength(newImages); i++) {
    191191        newImfileRow *newImfile = newImages->data[i];
  • trunk/ippTools/src/pzgetexp.c

    r9539 r9735  
    132132    psListIterator *lineCursor = psListIteratorAlloc(doc, 0, false);
    133133
    134     psArray *summitExps = psArrayAlloc(psListLength(doc));
     134    psArray *summitExps = psArrayAllocEmpty(psListLength(doc));
    135135    psString line;
    136136    while ((line = psListGetAndIncrement(lineCursor))) {
  • trunk/ippTools/src/pzgetimfiles.c

    r9539 r9735  
    179179    psListIterator *lineCursor = psListIteratorAlloc(doc, 0, false);
    180180
    181     psArray *pzPendingImfiles = psArrayAlloc(psListLength(doc));
     181    psArray *pzPendingImfiles = psArrayAllocEmpty(psListLength(doc));
    182182    psString line;
    183183    while ((line = psListGetAndIncrement(lineCursor))) {
  • trunk/ippTools/src/pztool.c

    r9539 r9735  
    285285            }
    286286
    287             psArray *nukeMe = psArrayAlloc(1);
     287            psArray *nukeMe = psArrayAllocEmpty(1);
    288288            psArrayAdd(nukeMe, 0, pendingExp);
    289289            bool status = pzPendingExpDeleteRowObjects(config->dbh, nukeMe, MAX_ROWS);
Note: See TracChangeset for help on using the changeset viewer.