Changeset 9735
- Timestamp:
- Oct 24, 2006, 2:11:38 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 10 edited
-
dettool.c (modified) (5 diffs)
-
p2insertPendingFrames.c (modified) (2 diffs)
-
p2pendingToDone.c (modified) (2 diffs)
-
p2rawToPending.c (modified) (2 diffs)
-
p2searchDoneFrames.c (modified) (2 diffs)
-
p2searchPendingFrames.c (modified) (4 diffs)
-
pxframes.c (modified) (5 diffs)
-
pzgetexp.c (modified) (1 diff)
-
pzgetimfiles.c (modified) (1 diff)
-
pztool.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r9711 r9735 278 278 } 279 279 } 280 280 281 281 psTime *use_begin = NULL; 282 282 { … … 397 397 398 398 // create new detInputExp row(s) from the rawDetrendExp row(s) 399 psArray *inputExps = psArrayAlloc (psArrayLength(detrendExps));399 psArray *inputExps = psArrayAllocEmpty(psArrayLength(detrendExps)); 400 400 for (long i = 0; i < psArrayLength(detrendExps); i++) { 401 401 detInputExpRow *inputExp = rawDetrenTodetInputExpRow( … … 646 646 } 647 647 } 648 648 649 649 psTime *use_begin = NULL; 650 650 { … … 714 714 715 715 // create new detInputExp row(s) from the rawDetrendExp row(s) 716 psArray *inputExps = psArrayAlloc (psArrayLength(detrendExps));716 psArray *inputExps = psArrayAllocEmpty(psArrayLength(detrendExps)); 717 717 for (long i = 0; i < psArrayLength(detrendExps); i++) { 718 718 detInputExpRow *inputExp = rawDetrenTodetInputExpRow( … … 4555 4555 psListIterator *iter = psListIteratorAlloc(exp_tag_list, 0, false); 4556 4556 psMetadataItem *mItem = NULL; 4557 psArray *newInputExps = psArrayAlloc (psListLength(exp_tag_list));4557 psArray *newInputExps = psArrayAllocEmpty(psListLength(exp_tag_list)); 4558 4558 while ((mItem = psListGetAndIncrement(iter))) { 4559 4559 detInputExpRow *inputExp = psHashLookup(valid_exp_tags, -
trunk/ippTools/src/p2insertPendingFrames.c
r9392 r9735 66 66 ); 67 67 68 psArray *pendingImages = psArrayAlloc (rawFrame->images->n);68 psArray *pendingImages = psArrayAllocEmpty(rawFrame->images->n); 69 69 for (long j = 0; j < rawFrame->images->n; j++) { 70 70 rawImfileRow *rawImage = rawFrame->images->data[j]; … … 80 80 psArrayAdd(pendingImages, 100, pendingImage); 81 81 } 82 82 83 83 if (!p2PendingExpInsertObject(config->dbh, pendingExposure)) { 84 84 psError(PS_ERR_UNKNOWN, false, "dbh access failed"); -
trunk/ippTools/src/p2pendingToDone.c
r9392 r9735 29 29 PS_ASSERT_PTR_NON_NULL(pendingFrames, NULL); 30 30 31 psArray *doneFrames = psArrayAlloc (pendingFrames->n);31 psArray *doneFrames = psArrayAllocEmpty(pendingFrames->n); 32 32 33 33 for (long i = 0; i < pendingFrames->n; i++) { … … 42 42 ); 43 43 44 psArray *doneImages = psArrayAlloc (pendingFrame->images->n);44 psArray *doneImages = psArrayAllocEmpty(pendingFrame->images->n); 45 45 for (long j = 0; j < pendingFrame->images->n; j++) { 46 46 p2PendingImfileRow *pendingImage = pendingFrame->images->data[j]; -
trunk/ippTools/src/p2rawToPending.c
r9392 r9735 29 29 PS_ASSERT_PTR_NON_NULL(rawFrames, NULL); 30 30 31 psArray *pendingFrames = psArrayAlloc (rawFrames->n);31 psArray *pendingFrames = psArrayAllocEmpty(rawFrames->n); 32 32 33 33 for (long i = 0; i < rawFrames->n; i++) { … … 51 51 ); 52 52 53 psArray *pendingImages = psArrayAlloc (rawFrame->images->n);53 psArray *pendingImages = psArrayAllocEmpty(rawFrame->images->n); 54 54 for (long j = 0; j < rawFrame->images->n; j++) { 55 55 rawImfileRow *rawImage = rawFrame->images->data[j]; -
trunk/ippTools/src/p2searchDoneFrames.c
r9392 r9735 37 37 38 38 // output array of rawScienceFrame 39 psArray *frames = psArrayAlloc (exposures->n);39 psArray *frames = psArrayAllocEmpty(exposures->n); 40 40 41 41 for (long i = 0; i < exposures->n; i++) { … … 61 61 62 62 return frames; 63 } 63 } -
trunk/ippTools/src/p2searchPendingFrames.c
r9392 r9735 37 37 38 38 // output array of rawSet 39 psArray *frames = psArrayAlloc (exposures->n);39 psArray *frames = psArrayAllocEmpty(exposures->n); 40 40 41 41 // 'where' to select each exposure … … 55 55 56 56 return frames; 57 } 57 } 58 58 59 59 // XXX EAM : this may be more efficient if we just select all p2PendingImages … … 91 91 psMetadata *where = NULL; 92 92 if (exp_tag) { 93 where = psMetadataAlloc(); 93 where = psMetadataAlloc(); 94 94 if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_tag", 0, "==", exp_tag)) { 95 95 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); … … 97 97 return false; 98 98 } 99 } 99 } 100 100 psArray *exps = p2PendingExpSelectRowObjects(config->dbh, where, MAX_ROWS); 101 101 psFree(where); -
trunk/ippTools/src/pxframes.c
r9392 r9735 90 90 \ 91 91 return true; \ 92 } 92 } 93 93 94 94 PX_FRAME_PRINT(pzPendingFrame, pzPendingImfile); … … 111 111 } \ 112 112 \ 113 psArray *allFrames = psArrayAlloc (psArrayLength(exposures)); \113 psArray *allFrames = psArrayAllocEmpty(psArrayLength(exposures)); \ 114 114 \ 115 115 for (long i = 0; i < psArrayLength(exposures); i++) { \ … … 143 143 \ 144 144 return allFrames; \ 145 } 145 } 146 146 147 147 PX_FRAME_SEARCH(pzPendingFrame, pzPendingExp, pzPendingImfile, exp_id); … … 177 177 178 178 /* 179 rawDetrendFrame *newToRawDetrendFrame(pxConfig *config, newFrame *newFrame) 179 rawDetrendFrame *newToRawDetrendFrame(pxConfig *config, newFrame *newFrame) 180 180 { 181 181 newExpRow *newExp = NULL; … … 187 187 188 188 psArray *newImages = newFrame->images; 189 psArray *rawImages = psArrayAlloc (psArrayLength(newImages));189 psArray *rawImages = psArrayAllocEmpty(psArrayLength(newImages)); 190 190 for (long i = 0; i < psArrayLength(newImages); i++) { 191 191 newImfileRow *newImfile = newImages->data[i]; -
trunk/ippTools/src/pzgetexp.c
r9539 r9735 132 132 psListIterator *lineCursor = psListIteratorAlloc(doc, 0, false); 133 133 134 psArray *summitExps = psArrayAlloc (psListLength(doc));134 psArray *summitExps = psArrayAllocEmpty(psListLength(doc)); 135 135 psString line; 136 136 while ((line = psListGetAndIncrement(lineCursor))) { -
trunk/ippTools/src/pzgetimfiles.c
r9539 r9735 179 179 psListIterator *lineCursor = psListIteratorAlloc(doc, 0, false); 180 180 181 psArray *pzPendingImfiles = psArrayAlloc (psListLength(doc));181 psArray *pzPendingImfiles = psArrayAllocEmpty(psListLength(doc)); 182 182 psString line; 183 183 while ((line = psListGetAndIncrement(lineCursor))) { -
trunk/ippTools/src/pztool.c
r9539 r9735 285 285 } 286 286 287 psArray *nukeMe = psArrayAlloc (1);287 psArray *nukeMe = psArrayAllocEmpty(1); 288 288 psArrayAdd(nukeMe, 0, pendingExp); 289 289 bool status = pzPendingExpDeleteRowObjects(config->dbh, nukeMe, MAX_ROWS);
Note:
See TracChangeset
for help on using the changeset viewer.
