Changeset 8094
- Timestamp:
- Aug 2, 2006, 4:55:32 PM (20 years ago)
- Location:
- branches/jhoblitt/ippdb
- Files:
-
- 9 edited
-
configure.ac (modified) (1 diff)
-
src/ippdb.c (modified) (112 diffs)
-
src/ippdb.h (modified) (32 diffs)
-
tests/alloc.c (modified) (16 diffs)
-
tests/insert.c (modified) (4 diffs)
-
tests/insertobject.c (modified) (8 diffs)
-
tests/metadatafromobject.c (modified) (16 diffs)
-
tests/objectfrommetadata.c (modified) (16 diffs)
-
tests/pop.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/jhoblitt/ippdb/configure.ac
r8089 r8094 1 1 AC_PREREQ(2.59) 2 2 3 AC_INIT([ippdb], [0.0. 9], [pan-starrs.ifa.hawaii.edu])3 AC_INIT([ippdb], [0.0.10], [pan-starrs.ifa.hawaii.edu]) 4 4 AC_CONFIG_SRCDIR([ippdb.pc.in]) 5 5 -
branches/jhoblitt/ippdb/src/ippdb.c
r8089 r8094 8929 8929 static void p2PendingImfileRowFree(p2PendingImfileRow *object); 8930 8930 8931 p2PendingImfileRow *p2PendingImfileRowAlloc(const char *exp_id, const char *class_id, const char *uri, const char * stats, const char *recipe, psS32 p1_version, psS32 p2_version)8931 p2PendingImfileRow *p2PendingImfileRowAlloc(const char *exp_id, const char *class_id, const char *uri, const char *recipe, psS32 p1_version, psS32 p2_version) 8932 8932 { 8933 8933 p2PendingImfileRow *object; … … 8939 8939 object->class_id = psStringCopy(class_id); 8940 8940 object->uri = psStringCopy(uri); 8941 object->stats = psStringCopy(stats);8942 8941 object->recipe = psStringCopy(recipe); 8943 8942 object->p1_version = p1_version; … … 8952 8951 psFree(object->class_id); 8953 8952 psFree(object->uri); 8954 psFree(object->stats);8955 8953 psFree(object->recipe); 8956 8954 } … … 8982 8980 return false; 8983 8981 } 8984 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {8985 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");8986 psFree(md);8987 return false;8988 }8989 8982 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) { 8990 8983 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 9015 9008 } 9016 9009 9017 bool p2PendingImfileInsert(psDB * dbh, const char *exp_id, const char *class_id, const char *uri, const char * stats, const char *recipe, psS32 p1_version, psS32 p2_version)9010 bool p2PendingImfileInsert(psDB * dbh, const char *exp_id, const char *class_id, const char *uri, const char *recipe, psS32 p1_version, psS32 p2_version) 9018 9011 { 9019 9012 psMetadata *md; … … 9036 9029 return false; 9037 9030 } 9038 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {9039 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");9040 psFree(md);9041 return false;9042 }9043 9031 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) { 9044 9032 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 9063 9051 } 9064 9052 9065 bool p2PendingImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char ** stats, char **recipe, psS32 *p1_version, psS32 *p2_version)9053 bool p2PendingImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **recipe, psS32 *p1_version, psS32 *p2_version) 9066 9054 { 9067 9055 psArray *rowSet; … … 9125 9113 return false; 9126 9114 } 9127 *stats = psMetadataLookupPtr(&status, row, "stats");9128 if (!status) {9129 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");9130 psFree(row);9131 return false;9132 }9133 9115 *recipe = psMetadataLookupPtr(&status, row, "recipe"); 9134 9116 if (!status) { … … 9157 9139 bool p2PendingImfileInsertObject(psDB *dbh, p2PendingImfileRow *object) 9158 9140 { 9159 return p2PendingImfileInsert(dbh, object->exp_id, object->class_id, object->uri, object-> stats, object->recipe, object->p1_version, object->p2_version);9141 return p2PendingImfileInsert(dbh, object->exp_id, object->class_id, object->uri, object->recipe, object->p1_version, object->p2_version); 9160 9142 } 9161 9143 … … 9165 9147 char class_id[256]; 9166 9148 char uri[256]; 9167 char stats[256];9168 9149 char recipe[256]; 9169 9150 psS32 p1_version; 9170 9151 psS32 p2_version; 9171 9152 9172 if (!p2PendingImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)& stats, (char **)&recipe, &p1_version, &p2_version)) {9153 if (!p2PendingImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe, &p1_version, &p2_version)) { 9173 9154 psError(PS_ERR_UNKNOWN, false, "failed to pop a database row"); 9174 9155 return NULL; 9175 9156 } 9176 9157 9177 return p2PendingImfileRowAlloc(exp_id, class_id, uri, stats,recipe, p1_version, p2_version);9158 return p2PendingImfileRowAlloc(exp_id, class_id, uri, recipe, p1_version, p2_version); 9178 9159 } 9179 9160 … … 9289 9270 return NULL; 9290 9271 } 9291 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {9292 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");9293 psFree(md);9294 return NULL;9295 }9296 9272 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) { 9297 9273 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 9319 9295 char *class_id; 9320 9296 char *uri; 9321 char *stats;9322 9297 char *recipe; 9323 9298 psS32 p1_version; … … 9339 9314 return false; 9340 9315 } 9341 stats = psMetadataLookupPtr(&status, md, "stats");9342 if (!status) {9343 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");9344 return false;9345 }9346 9316 recipe = psMetadataLookupPtr(&status, md, "recipe"); 9347 9317 if (!status) { … … 9360 9330 } 9361 9331 9362 return p2PendingImfileRowAlloc(exp_id, class_id, uri, stats,recipe, p1_version, p2_version);9332 return p2PendingImfileRowAlloc(exp_id, class_id, uri, recipe, p1_version, p2_version); 9363 9333 } 9364 9334 psArray *p2PendingImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 10111 10081 static void p2DoneImfileRowFree(p2DoneImfileRow *object); 10112 10082 10113 p2DoneImfileRow *p2DoneImfileRowAlloc(const char *exp_id, const char *class_id, const char *uri, const char * stats, const char *recipe, psS32 p1_version, psS32 p2_version)10083 p2DoneImfileRow *p2DoneImfileRowAlloc(const char *exp_id, const char *class_id, const char *uri, const char *recipe, psS32 p1_version, psS32 p2_version) 10114 10084 { 10115 10085 p2DoneImfileRow *object; … … 10121 10091 object->class_id = psStringCopy(class_id); 10122 10092 object->uri = psStringCopy(uri); 10123 object->stats = psStringCopy(stats);10124 10093 object->recipe = psStringCopy(recipe); 10125 10094 object->p1_version = p1_version; … … 10134 10103 psFree(object->class_id); 10135 10104 psFree(object->uri); 10136 psFree(object->stats);10137 10105 psFree(object->recipe); 10138 10106 } … … 10164 10132 return false; 10165 10133 } 10166 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {10167 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");10168 psFree(md);10169 return false;10170 }10171 10134 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) { 10172 10135 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 10197 10160 } 10198 10161 10199 bool p2DoneImfileInsert(psDB * dbh, const char *exp_id, const char *class_id, const char *uri, const char * stats, const char *recipe, psS32 p1_version, psS32 p2_version)10162 bool p2DoneImfileInsert(psDB * dbh, const char *exp_id, const char *class_id, const char *uri, const char *recipe, psS32 p1_version, psS32 p2_version) 10200 10163 { 10201 10164 psMetadata *md; … … 10218 10181 return false; 10219 10182 } 10220 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {10221 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");10222 psFree(md);10223 return false;10224 }10225 10183 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) { 10226 10184 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 10245 10203 } 10246 10204 10247 bool p2DoneImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char ** stats, char **recipe, psS32 *p1_version, psS32 *p2_version)10205 bool p2DoneImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **recipe, psS32 *p1_version, psS32 *p2_version) 10248 10206 { 10249 10207 psArray *rowSet; … … 10307 10265 return false; 10308 10266 } 10309 *stats = psMetadataLookupPtr(&status, row, "stats");10310 if (!status) {10311 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");10312 psFree(row);10313 return false;10314 }10315 10267 *recipe = psMetadataLookupPtr(&status, row, "recipe"); 10316 10268 if (!status) { … … 10339 10291 bool p2DoneImfileInsertObject(psDB *dbh, p2DoneImfileRow *object) 10340 10292 { 10341 return p2DoneImfileInsert(dbh, object->exp_id, object->class_id, object->uri, object-> stats, object->recipe, object->p1_version, object->p2_version);10293 return p2DoneImfileInsert(dbh, object->exp_id, object->class_id, object->uri, object->recipe, object->p1_version, object->p2_version); 10342 10294 } 10343 10295 … … 10347 10299 char class_id[256]; 10348 10300 char uri[256]; 10349 char stats[256];10350 10301 char recipe[256]; 10351 10302 psS32 p1_version; 10352 10303 psS32 p2_version; 10353 10304 10354 if (!p2DoneImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)& stats, (char **)&recipe, &p1_version, &p2_version)) {10305 if (!p2DoneImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe, &p1_version, &p2_version)) { 10355 10306 psError(PS_ERR_UNKNOWN, false, "failed to pop a database row"); 10356 10307 return NULL; 10357 10308 } 10358 10309 10359 return p2DoneImfileRowAlloc(exp_id, class_id, uri, stats,recipe, p1_version, p2_version);10310 return p2DoneImfileRowAlloc(exp_id, class_id, uri, recipe, p1_version, p2_version); 10360 10311 } 10361 10312 … … 10471 10422 return NULL; 10472 10423 } 10473 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {10474 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");10475 psFree(md);10476 return NULL;10477 }10478 10424 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) { 10479 10425 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 10501 10447 char *class_id; 10502 10448 char *uri; 10503 char *stats;10504 10449 char *recipe; 10505 10450 psS32 p1_version; … … 10521 10466 return false; 10522 10467 } 10523 stats = psMetadataLookupPtr(&status, md, "stats");10524 if (!status) {10525 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");10526 return false;10527 }10528 10468 recipe = psMetadataLookupPtr(&status, md, "recipe"); 10529 10469 if (!status) { … … 10542 10482 } 10543 10483 10544 return p2DoneImfileRowAlloc(exp_id, class_id, uri, stats,recipe, p1_version, p2_version);10484 return p2DoneImfileRowAlloc(exp_id, class_id, uri, recipe, p1_version, p2_version); 10545 10485 } 10546 10486 psArray *p2DoneImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 12266 12206 static void detProcessedImfileRowFree(detProcessedImfileRow *object); 12267 12207 12268 detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char * stats, const char *recipe)12208 detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *recipe) 12269 12209 { 12270 12210 detProcessedImfileRow *object; … … 12277 12217 object->class_id = psStringCopy(class_id); 12278 12218 object->uri = psStringCopy(uri); 12279 object->stats = psStringCopy(stats);12280 12219 object->recipe = psStringCopy(recipe); 12281 12220 … … 12288 12227 psFree(object->class_id); 12289 12228 psFree(object->uri); 12290 psFree(object->stats);12291 12229 psFree(object->recipe); 12292 12230 } … … 12323 12261 return false; 12324 12262 } 12325 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {12326 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");12327 psFree(md);12328 return false;12329 }12330 12263 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) { 12331 12264 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 12346 12279 } 12347 12280 12348 bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char * stats, const char *recipe)12281 bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *recipe) 12349 12282 { 12350 12283 psMetadata *md; … … 12372 12305 return false; 12373 12306 } 12374 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {12375 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");12376 psFree(md);12377 return false;12378 }12379 12307 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) { 12380 12308 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 12389 12317 } 12390 12318 12391 bool detProcessedImfilePop(psDB *dbh, psS32 *det_id, char **exp_id, char **class_id, char **uri, char ** stats, char **recipe)12319 bool detProcessedImfilePop(psDB *dbh, psS32 *det_id, char **exp_id, char **class_id, char **uri, char **recipe) 12392 12320 { 12393 12321 psArray *rowSet; … … 12457 12385 return false; 12458 12386 } 12459 *stats = psMetadataLookupPtr(&status, row, "stats");12460 if (!status) {12461 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");12462 psFree(row);12463 return false;12464 }12465 12387 *recipe = psMetadataLookupPtr(&status, row, "recipe"); 12466 12388 if (!status) { … … 12477 12399 bool detProcessedImfileInsertObject(psDB *dbh, detProcessedImfileRow *object) 12478 12400 { 12479 return detProcessedImfileInsert(dbh, object->det_id, object->exp_id, object->class_id, object->uri, object-> stats, object->recipe);12401 return detProcessedImfileInsert(dbh, object->det_id, object->exp_id, object->class_id, object->uri, object->recipe); 12480 12402 } 12481 12403 … … 12486 12408 char class_id[256]; 12487 12409 char uri[256]; 12488 char stats[256];12489 12410 char recipe[256]; 12490 12411 12491 if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)& stats, (char **)&recipe)) {12412 if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe)) { 12492 12413 psError(PS_ERR_UNKNOWN, false, "failed to pop a database row"); 12493 12414 return NULL; 12494 12415 } 12495 12416 12496 return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, stats,recipe);12417 return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe); 12497 12418 } 12498 12419 … … 12613 12534 return NULL; 12614 12535 } 12615 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {12616 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");12617 psFree(md);12618 return NULL;12619 }12620 12536 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) { 12621 12537 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 12634 12550 char *class_id; 12635 12551 char *uri; 12636 char *stats;12637 12552 char *recipe; 12638 12553 … … 12657 12572 return false; 12658 12573 } 12659 stats = psMetadataLookupPtr(&status, md, "stats");12660 if (!status) {12661 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");12662 return false;12663 }12664 12574 recipe = psMetadataLookupPtr(&status, md, "recipe"); 12665 12575 if (!status) { … … 12668 12578 } 12669 12579 12670 return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, stats,recipe);12580 return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe); 12671 12581 } 12672 12582 psArray *detProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 12726 12636 static void detStackedImfileRowFree(detStackedImfileRow *object); 12727 12637 12728 detStackedImfileRow *detStackedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char * stats, const char *recipe)12638 detStackedImfileRow *detStackedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe) 12729 12639 { 12730 12640 detStackedImfileRow *object; … … 12737 12647 object->class_id = psStringCopy(class_id); 12738 12648 object->uri = psStringCopy(uri); 12739 object->stats = psStringCopy(stats);12740 12649 object->recipe = psStringCopy(recipe); 12741 12650 … … 12747 12656 psFree(object->class_id); 12748 12657 psFree(object->uri); 12749 psFree(object->stats);12750 12658 psFree(object->recipe); 12751 12659 } … … 12782 12690 return false; 12783 12691 } 12784 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {12785 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");12786 psFree(md);12787 return false;12788 }12789 12692 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) { 12790 12693 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 12805 12708 } 12806 12709 12807 bool detStackedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char * stats, const char *recipe)12710 bool detStackedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe) 12808 12711 { 12809 12712 psMetadata *md; … … 12831 12734 return false; 12832 12735 } 12833 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {12834 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");12835 psFree(md);12836 return false;12837 }12838 12736 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) { 12839 12737 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 12848 12746 } 12849 12747 12850 bool detStackedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char ** stats, char **recipe)12748 bool detStackedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char **recipe) 12851 12749 { 12852 12750 psArray *rowSet; … … 12916 12814 return false; 12917 12815 } 12918 *stats = psMetadataLookupPtr(&status, row, "stats");12919 if (!status) {12920 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");12921 psFree(row);12922 return false;12923 }12924 12816 *recipe = psMetadataLookupPtr(&status, row, "recipe"); 12925 12817 if (!status) { … … 12936 12828 bool detStackedImfileInsertObject(psDB *dbh, detStackedImfileRow *object) 12937 12829 { 12938 return detStackedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object-> stats, object->recipe);12830 return detStackedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->recipe); 12939 12831 } 12940 12832 … … 12945 12837 char class_id[256]; 12946 12838 char uri[256]; 12947 char stats[256];12948 12839 char recipe[256]; 12949 12840 12950 if (!detStackedImfilePop(dbh, &det_id, &iteration, (char **)&class_id, (char **)&uri, (char **)& stats, (char **)&recipe)) {12841 if (!detStackedImfilePop(dbh, &det_id, &iteration, (char **)&class_id, (char **)&uri, (char **)&recipe)) { 12951 12842 psError(PS_ERR_UNKNOWN, false, "failed to pop a database row"); 12952 12843 return NULL; 12953 12844 } 12954 12845 12955 return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, stats,recipe);12846 return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, recipe); 12956 12847 } 12957 12848 … … 13072 12963 return NULL; 13073 12964 } 13074 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {13075 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");13076 psFree(md);13077 return NULL;13078 }13079 12965 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) { 13080 12966 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 13093 12979 char *class_id; 13094 12980 char *uri; 13095 char *stats;13096 12981 char *recipe; 13097 12982 … … 13116 13001 return false; 13117 13002 } 13118 stats = psMetadataLookupPtr(&status, md, "stats");13119 if (!status) {13120 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");13121 return false;13122 }13123 13003 recipe = psMetadataLookupPtr(&status, md, "recipe"); 13124 13004 if (!status) { … … 13127 13007 } 13128 13008 13129 return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, stats,recipe);13009 return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, recipe); 13130 13010 } 13131 13011 psArray *detStackedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 13185 13065 static void detNormalizedImfileRowFree(detNormalizedImfileRow *object); 13186 13066 13187 detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char * stats, const char *recipe)13067 detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe) 13188 13068 { 13189 13069 detNormalizedImfileRow *object; … … 13196 13076 object->class_id = psStringCopy(class_id); 13197 13077 object->uri = psStringCopy(uri); 13198 object->stats = psStringCopy(stats);13199 13078 object->recipe = psStringCopy(recipe); 13200 13079 … … 13206 13085 psFree(object->class_id); 13207 13086 psFree(object->uri); 13208 psFree(object->stats);13209 13087 psFree(object->recipe); 13210 13088 } … … 13241 13119 return false; 13242 13120 } 13243 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {13244 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");13245 psFree(md);13246 return false;13247 }13248 13121 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) { 13249 13122 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 13264 13137 } 13265 13138 13266 bool detNormalizedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char * stats, const char *recipe)13139 bool detNormalizedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe) 13267 13140 { 13268 13141 psMetadata *md; … … 13290 13163 return false; 13291 13164 } 13292 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {13293 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");13294 psFree(md);13295 return false;13296 }13297 13165 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) { 13298 13166 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 13307 13175 } 13308 13176 13309 bool detNormalizedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char ** stats, char **recipe)13177 bool detNormalizedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char **recipe) 13310 13178 { 13311 13179 psArray *rowSet; … … 13375 13243 return false; 13376 13244 } 13377 *stats = psMetadataLookupPtr(&status, row, "stats");13378 if (!status) {13379 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");13380 psFree(row);13381 return false;13382 }13383 13245 *recipe = psMetadataLookupPtr(&status, row, "recipe"); 13384 13246 if (!status) { … … 13395 13257 bool detNormalizedImfileInsertObject(psDB *dbh, detNormalizedImfileRow *object) 13396 13258 { 13397 return detNormalizedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object-> stats, object->recipe);13259 return detNormalizedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->recipe); 13398 13260 } 13399 13261 … … 13404 13266 char class_id[256]; 13405 13267 char uri[256]; 13406 char stats[256];13407 13268 char recipe[256]; 13408 13269 13409 if (!detNormalizedImfilePop(dbh, &det_id, &iteration, (char **)&class_id, (char **)&uri, (char **)& stats, (char **)&recipe)) {13270 if (!detNormalizedImfilePop(dbh, &det_id, &iteration, (char **)&class_id, (char **)&uri, (char **)&recipe)) { 13410 13271 psError(PS_ERR_UNKNOWN, false, "failed to pop a database row"); 13411 13272 return NULL; 13412 13273 } 13413 13274 13414 return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, stats,recipe);13275 return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, recipe); 13415 13276 } 13416 13277 … … 13531 13392 return NULL; 13532 13393 } 13533 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {13534 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");13535 psFree(md);13536 return NULL;13537 }13538 13394 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) { 13539 13395 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 13552 13408 char *class_id; 13553 13409 char *uri; 13554 char *stats;13555 13410 char *recipe; 13556 13411 … … 13575 13430 return false; 13576 13431 } 13577 stats = psMetadataLookupPtr(&status, md, "stats");13578 if (!status) {13579 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");13580 return false;13581 }13582 13432 recipe = psMetadataLookupPtr(&status, md, "recipe"); 13583 13433 if (!status) { … … 13586 13436 } 13587 13437 13588 return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, stats,recipe);13438 return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, recipe); 13589 13439 } 13590 13440 psArray *detNormalizedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 14013 13863 static void detMasterImfileRowFree(detMasterImfileRow *object); 14014 13864 14015 detMasterImfileRow *detMasterImfileRowAlloc(psS32 det_id, const char *class_id, const char *uri, const char * stats, const char *recipe)13865 detMasterImfileRow *detMasterImfileRowAlloc(psS32 det_id, const char *class_id, const char *uri, const char *recipe) 14016 13866 { 14017 13867 detMasterImfileRow *object; … … 14023 13873 object->class_id = psStringCopy(class_id); 14024 13874 object->uri = psStringCopy(uri); 14025 object->stats = psStringCopy(stats);14026 13875 object->recipe = psStringCopy(recipe); 14027 13876 … … 14033 13882 psFree(object->class_id); 14034 13883 psFree(object->uri); 14035 psFree(object->stats);14036 13884 psFree(object->recipe); 14037 13885 } … … 14063 13911 return false; 14064 13912 } 14065 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {14066 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");14067 psFree(md);14068 return false;14069 }14070 13913 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) { 14071 13914 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 14086 13929 } 14087 13930 14088 bool detMasterImfileInsert(psDB * dbh, psS32 det_id, const char *class_id, const char *uri, const char * stats, const char *recipe)13931 bool detMasterImfileInsert(psDB * dbh, psS32 det_id, const char *class_id, const char *uri, const char *recipe) 14089 13932 { 14090 13933 psMetadata *md; … … 14107 13950 return false; 14108 13951 } 14109 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {14110 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");14111 psFree(md);14112 return false;14113 }14114 13952 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) { 14115 13953 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 14124 13962 } 14125 13963 14126 bool detMasterImfilePop(psDB *dbh, psS32 *det_id, char **class_id, char **uri, char ** stats, char **recipe)13964 bool detMasterImfilePop(psDB *dbh, psS32 *det_id, char **class_id, char **uri, char **recipe) 14127 13965 { 14128 13966 psArray *rowSet; … … 14186 14024 return false; 14187 14025 } 14188 *stats = psMetadataLookupPtr(&status, row, "stats");14189 if (!status) {14190 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");14191 psFree(row);14192 return false;14193 }14194 14026 *recipe = psMetadataLookupPtr(&status, row, "recipe"); 14195 14027 if (!status) { … … 14206 14038 bool detMasterImfileInsertObject(psDB *dbh, detMasterImfileRow *object) 14207 14039 { 14208 return detMasterImfileInsert(dbh, object->det_id, object->class_id, object->uri, object-> stats, object->recipe);14040 return detMasterImfileInsert(dbh, object->det_id, object->class_id, object->uri, object->recipe); 14209 14041 } 14210 14042 … … 14214 14046 char class_id[256]; 14215 14047 char uri[256]; 14216 char stats[256];14217 14048 char recipe[256]; 14218 14049 14219 if (!detMasterImfilePop(dbh, &det_id, (char **)&class_id, (char **)&uri, (char **)& stats, (char **)&recipe)) {14050 if (!detMasterImfilePop(dbh, &det_id, (char **)&class_id, (char **)&uri, (char **)&recipe)) { 14220 14051 psError(PS_ERR_UNKNOWN, false, "failed to pop a database row"); 14221 14052 return NULL; 14222 14053 } 14223 14054 14224 return detMasterImfileRowAlloc(det_id, class_id, uri, stats,recipe);14055 return detMasterImfileRowAlloc(det_id, class_id, uri, recipe); 14225 14056 } 14226 14057 … … 14336 14167 return NULL; 14337 14168 } 14338 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {14339 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");14340 psFree(md);14341 return NULL;14342 }14343 14169 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) { 14344 14170 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 14356 14182 char *class_id; 14357 14183 char *uri; 14358 char *stats;14359 14184 char *recipe; 14360 14185 … … 14374 14199 return false; 14375 14200 } 14376 stats = psMetadataLookupPtr(&status, md, "stats");14377 if (!status) {14378 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");14379 return false;14380 }14381 14201 recipe = psMetadataLookupPtr(&status, md, "recipe"); 14382 14202 if (!status) { … … 14385 14205 } 14386 14206 14387 return detMasterImfileRowAlloc(det_id, class_id, uri, stats,recipe);14207 return detMasterImfileRowAlloc(det_id, class_id, uri, recipe); 14388 14208 } 14389 14209 psArray *detMasterImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 14443 14263 static void detResidImfileAnalysisRowFree(detResidImfileAnalysisRow *object); 14444 14264 14445 detResidImfileAnalysisRow *detResidImfileAnalysisRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *class_id, const char * stats, const char *recipe)14265 detResidImfileAnalysisRow *detResidImfileAnalysisRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *class_id, const char *recipe) 14446 14266 { 14447 14267 detResidImfileAnalysisRow *object; … … 14454 14274 object->exp_id = psStringCopy(exp_id); 14455 14275 object->class_id = psStringCopy(class_id); 14456 object->stats = psStringCopy(stats);14457 14276 object->recipe = psStringCopy(recipe); 14458 14277 … … 14464 14283 psFree(object->exp_id); 14465 14284 psFree(object->class_id); 14466 psFree(object->stats);14467 14285 psFree(object->recipe); 14468 14286 } … … 14499 14317 return false; 14500 14318 } 14501 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {14502 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");14503 psFree(md);14504 return false;14505 }14506 14319 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) { 14507 14320 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 14522 14335 } 14523 14336 14524 bool detResidImfileAnalysisInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *class_id, const char * stats, const char *recipe)14337 bool detResidImfileAnalysisInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *class_id, const char *recipe) 14525 14338 { 14526 14339 psMetadata *md; … … 14548 14361 return false; 14549 14362 } 14550 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {14551 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");14552 psFree(md);14553 return false;14554 }14555 14363 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) { 14556 14364 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 14565 14373 } 14566 14374 14567 bool detResidImfileAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **class_id, char ** stats, char **recipe)14375 bool detResidImfileAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **class_id, char **recipe) 14568 14376 { 14569 14377 psArray *rowSet; … … 14633 14441 return false; 14634 14442 } 14635 *stats = psMetadataLookupPtr(&status, row, "stats");14636 if (!status) {14637 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");14638 psFree(row);14639 return false;14640 }14641 14443 *recipe = psMetadataLookupPtr(&status, row, "recipe"); 14642 14444 if (!status) { … … 14653 14455 bool detResidImfileAnalysisInsertObject(psDB *dbh, detResidImfileAnalysisRow *object) 14654 14456 { 14655 return detResidImfileAnalysisInsert(dbh, object->det_id, object->iteration, object->exp_id, object->class_id, object-> stats, object->recipe);14457 return detResidImfileAnalysisInsert(dbh, object->det_id, object->iteration, object->exp_id, object->class_id, object->recipe); 14656 14458 } 14657 14459 … … 14662 14464 char exp_id[256]; 14663 14465 char class_id[256]; 14664 char stats[256];14665 14466 char recipe[256]; 14666 14467 14667 if (!detResidImfileAnalysisPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&class_id, (char **)& stats, (char **)&recipe)) {14468 if (!detResidImfileAnalysisPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&class_id, (char **)&recipe)) { 14668 14469 psError(PS_ERR_UNKNOWN, false, "failed to pop a database row"); 14669 14470 return NULL; 14670 14471 } 14671 14472 14672 return detResidImfileAnalysisRowAlloc(det_id, iteration, exp_id, class_id, stats,recipe);14473 return detResidImfileAnalysisRowAlloc(det_id, iteration, exp_id, class_id, recipe); 14673 14474 } 14674 14475 … … 14789 14590 return NULL; 14790 14591 } 14791 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {14792 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");14793 psFree(md);14794 return NULL;14795 }14796 14592 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) { 14797 14593 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 14810 14606 char *exp_id; 14811 14607 char *class_id; 14812 char *stats;14813 14608 char *recipe; 14814 14609 … … 14833 14628 return false; 14834 14629 } 14835 stats = psMetadataLookupPtr(&status, md, "stats");14836 if (!status) {14837 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");14838 return false;14839 }14840 14630 recipe = psMetadataLookupPtr(&status, md, "recipe"); 14841 14631 if (!status) { … … 14844 14634 } 14845 14635 14846 return detResidImfileAnalysisRowAlloc(det_id, iteration, exp_id, class_id, stats,recipe);14636 return detResidImfileAnalysisRowAlloc(det_id, iteration, exp_id, class_id, recipe); 14847 14637 } 14848 14638 psArray *detResidImfileAnalysisSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 14902 14692 static void detResidExpAnalysisRowFree(detResidExpAnalysisRow *object); 14903 14693 14904 detResidExpAnalysisRow *detResidExpAnalysisRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char * stats, const char *recipe, bool accept)14694 detResidExpAnalysisRow *detResidExpAnalysisRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *recipe, bool accept) 14905 14695 { 14906 14696 detResidExpAnalysisRow *object; … … 14912 14702 object->iteration = iteration; 14913 14703 object->exp_id = psStringCopy(exp_id); 14914 object->stats = psStringCopy(stats);14915 14704 object->recipe = psStringCopy(recipe); 14916 14705 object->accept = accept; … … 14922 14711 { 14923 14712 psFree(object->exp_id); 14924 psFree(object->stats);14925 14713 psFree(object->recipe); 14926 14714 } … … 14952 14740 return false; 14953 14741 } 14954 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {14955 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");14956 psFree(md);14957 return false;14958 }14959 14742 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) { 14960 14743 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 14980 14763 } 14981 14764 14982 bool detResidExpAnalysisInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char * stats, const char *recipe, bool accept)14765 bool detResidExpAnalysisInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *recipe, bool accept) 14983 14766 { 14984 14767 psMetadata *md; … … 15001 14784 return false; 15002 14785 } 15003 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {15004 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");15005 psFree(md);15006 return false;15007 }15008 14786 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) { 15009 14787 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 15023 14801 } 15024 14802 15025 bool detResidExpAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char ** stats, char **recipe, bool *accept)14803 bool detResidExpAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **recipe, bool *accept) 15026 14804 { 15027 14805 psArray *rowSet; … … 15085 14863 return false; 15086 14864 } 15087 *stats = psMetadataLookupPtr(&status, row, "stats");15088 if (!status) {15089 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");15090 psFree(row);15091 return false;15092 }15093 14865 *recipe = psMetadataLookupPtr(&status, row, "recipe"); 15094 14866 if (!status) { … … 15111 14883 bool detResidExpAnalysisInsertObject(psDB *dbh, detResidExpAnalysisRow *object) 15112 14884 { 15113 return detResidExpAnalysisInsert(dbh, object->det_id, object->iteration, object->exp_id, object-> stats, object->recipe, object->accept);14885 return detResidExpAnalysisInsert(dbh, object->det_id, object->iteration, object->exp_id, object->recipe, object->accept); 15114 14886 } 15115 14887 … … 15119 14891 psS32 iteration; 15120 14892 char exp_id[256]; 15121 char stats[256];15122 14893 char recipe[256]; 15123 14894 bool accept; 15124 14895 15125 if (!detResidExpAnalysisPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)& stats, (char **)&recipe, &accept)) {14896 if (!detResidExpAnalysisPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&recipe, &accept)) { 15126 14897 psError(PS_ERR_UNKNOWN, false, "failed to pop a database row"); 15127 14898 return NULL; 15128 14899 } 15129 14900 15130 return detResidExpAnalysisRowAlloc(det_id, iteration, exp_id, stats,recipe, accept);14901 return detResidExpAnalysisRowAlloc(det_id, iteration, exp_id, recipe, accept); 15131 14902 } 15132 14903 … … 15242 15013 return NULL; 15243 15014 } 15244 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {15245 psError(PS_ERR_UNKNOWN, false, "failed to add item stats");15246 psFree(md);15247 return NULL;15248 }15249 15015 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) { 15250 15016 psError(PS_ERR_UNKNOWN, false, "failed to add item recipe"); … … 15267 15033 psS32 iteration; 15268 15034 char *exp_id; 15269 char *stats;15270 15035 char *recipe; 15271 15036 bool accept; … … 15286 15051 return false; 15287 15052 } 15288 stats = psMetadataLookupPtr(&status, md, "stats");15289 if (!status) {15290 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");15291 return false;15292 }15293 15053 recipe = psMetadataLookupPtr(&status, md, "recipe"); 15294 15054 if (!status) { … … 15302 15062 } 15303 15063 15304 return detResidExpAnalysisRowAlloc(det_id, iteration, exp_id, stats,recipe, accept);15064 return detResidExpAnalysisRowAlloc(det_id, iteration, exp_id, recipe, accept); 15305 15065 } 15306 15066 psArray *detResidExpAnalysisSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) -
branches/jhoblitt/ippdb/src/ippdb.h
r8089 r8094 3490 3490 char *class_id; 3491 3491 char *uri; 3492 char *stats;3493 3492 char *recipe; 3494 3493 psS32 p1_version; … … 3505 3504 const char *class_id, 3506 3505 const char *uri, 3507 const char *stats,3508 3506 const char *recipe, 3509 3507 psS32 p1_version, … … 3541 3539 const char *class_id, 3542 3540 const char *uri, 3543 const char *stats,3544 3541 const char *recipe, 3545 3542 psS32 p1_version, … … 3557 3554 char **class_id, 3558 3555 char **uri, 3559 char **stats,3560 3556 char **recipe, 3561 3557 psS32 *p1_version, … … 3900 3896 char *class_id; 3901 3897 char *uri; 3902 char *stats;3903 3898 char *recipe; 3904 3899 psS32 p1_version; … … 3915 3910 const char *class_id, 3916 3911 const char *uri, 3917 const char *stats,3918 3912 const char *recipe, 3919 3913 psS32 p1_version, … … 3951 3945 const char *class_id, 3952 3946 const char *uri, 3953 const char *stats,3954 3947 const char *recipe, 3955 3948 psS32 p1_version, … … 3967 3960 char **class_id, 3968 3961 char **uri, 3969 char **stats,3970 3962 char **recipe, 3971 3963 psS32 *p1_version, … … 4693 4685 char *class_id; 4694 4686 char *uri; 4695 char *stats;4696 4687 char *recipe; 4697 4688 } detProcessedImfileRow; … … 4707 4698 const char *class_id, 4708 4699 const char *uri, 4709 const char *stats,4710 4700 const char *recipe 4711 4701 ); … … 4742 4732 const char *class_id, 4743 4733 const char *uri, 4744 const char *stats,4745 4734 const char *recipe 4746 4735 ); … … 4757 4746 char **class_id, 4758 4747 char **uri, 4759 char **stats,4760 4748 char **recipe 4761 4749 ); … … 4880 4868 char *class_id; 4881 4869 char *uri; 4882 char *stats;4883 4870 char *recipe; 4884 4871 } detStackedImfileRow; … … 4894 4881 const char *class_id, 4895 4882 const char *uri, 4896 const char *stats,4897 4883 const char *recipe 4898 4884 ); … … 4929 4915 const char *class_id, 4930 4916 const char *uri, 4931 const char *stats,4932 4917 const char *recipe 4933 4918 ); … … 4944 4929 char **class_id, 4945 4930 char **uri, 4946 char **stats,4947 4931 char **recipe 4948 4932 ); … … 5067 5051 char *class_id; 5068 5052 char *uri; 5069 char *stats;5070 5053 char *recipe; 5071 5054 } detNormalizedImfileRow; … … 5081 5064 const char *class_id, 5082 5065 const char *uri, 5083 const char *stats,5084 5066 const char *recipe 5085 5067 ); … … 5116 5098 const char *class_id, 5117 5099 const char *uri, 5118 const char *stats,5119 5100 const char *recipe 5120 5101 ); … … 5131 5112 char **class_id, 5132 5113 char **uri, 5133 char **stats,5134 5114 char **recipe 5135 5115 ); … … 5428 5408 char *class_id; 5429 5409 char *uri; 5430 char *stats;5431 5410 char *recipe; 5432 5411 } detMasterImfileRow; … … 5441 5420 const char *class_id, 5442 5421 const char *uri, 5443 const char *stats,5444 5422 const char *recipe 5445 5423 ); … … 5475 5453 const char *class_id, 5476 5454 const char *uri, 5477 const char *stats,5478 5455 const char *recipe 5479 5456 ); … … 5489 5466 char **class_id, 5490 5467 char **uri, 5491 char **stats,5492 5468 char **recipe 5493 5469 ); … … 5612 5588 char *exp_id; 5613 5589 char *class_id; 5614 char *stats;5615 5590 char *recipe; 5616 5591 } detResidImfileAnalysisRow; … … 5626 5601 const char *exp_id, 5627 5602 const char *class_id, 5628 const char *stats,5629 5603 const char *recipe 5630 5604 ); … … 5661 5635 const char *exp_id, 5662 5636 const char *class_id, 5663 const char *stats,5664 5637 const char *recipe 5665 5638 ); … … 5676 5649 char **exp_id, 5677 5650 char **class_id, 5678 char **stats,5679 5651 char **recipe 5680 5652 ); … … 5798 5770 psS32 iteration; 5799 5771 char *exp_id; 5800 char *stats;5801 5772 char *recipe; 5802 5773 bool accept; … … 5812 5783 psS32 iteration, 5813 5784 const char *exp_id, 5814 const char *stats,5815 5785 const char *recipe, 5816 5786 bool accept … … 5847 5817 psS32 iteration, 5848 5818 const char *exp_id, 5849 const char *stats,5850 5819 const char *recipe, 5851 5820 bool accept … … 5862 5831 psS32 *iteration, 5863 5832 char **exp_id, 5864 char **stats,5865 5833 char **recipe, 5866 5834 bool *accept -
branches/jhoblitt/ippdb/tests/alloc.c
r8089 r8094 760 760 p2PendingImfileRow *object; 761 761 762 object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string",-32, -32 );762 object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", -32, -32 ); 763 763 764 764 if (!object) { … … 778 778 exit(EXIT_FAILURE); 779 779 } 780 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {781 psFree(object);782 exit(EXIT_FAILURE);783 }784 780 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 785 781 psFree(object); … … 870 866 p2DoneImfileRow *object; 871 867 872 object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string",-32, -32 );868 object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", -32, -32 ); 873 869 874 870 if (!object) { … … 888 884 exit(EXIT_FAILURE); 889 885 } 890 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {891 psFree(object);892 exit(EXIT_FAILURE);893 }894 886 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 895 887 psFree(object); … … 1062 1054 detProcessedImfileRow *object; 1063 1055 1064 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string" , "a string");1056 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string" ); 1065 1057 1066 1058 if (!object) { … … 1084 1076 exit(EXIT_FAILURE); 1085 1077 } 1086 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1087 psFree(object);1088 exit(EXIT_FAILURE);1089 }1090 1078 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 1091 1079 psFree(object); … … 1099 1087 detStackedImfileRow *object; 1100 1088 1101 object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");1089 object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string" ); 1102 1090 1103 1091 if (!object) { … … 1121 1109 exit(EXIT_FAILURE); 1122 1110 } 1123 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1124 psFree(object);1125 exit(EXIT_FAILURE);1126 }1127 1111 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 1128 1112 psFree(object); … … 1136 1120 detNormalizedImfileRow *object; 1137 1121 1138 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");1122 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string" ); 1139 1123 1140 1124 if (!object) { … … 1158 1142 exit(EXIT_FAILURE); 1159 1143 } 1160 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1161 psFree(object);1162 exit(EXIT_FAILURE);1163 }1164 1144 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 1165 1145 psFree(object); … … 1198 1178 detMasterImfileRow *object; 1199 1179 1200 object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string" , "a string");1180 object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string" ); 1201 1181 1202 1182 if (!object) { … … 1216 1196 exit(EXIT_FAILURE); 1217 1197 } 1218 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1219 psFree(object);1220 exit(EXIT_FAILURE);1221 }1222 1198 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 1223 1199 psFree(object); … … 1231 1207 detResidImfileAnalysisRow *object; 1232 1208 1233 object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");1209 object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string" ); 1234 1210 1235 1211 if (!object) { … … 1253 1229 exit(EXIT_FAILURE); 1254 1230 } 1255 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1256 psFree(object);1257 exit(EXIT_FAILURE);1258 }1259 1231 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 1260 1232 psFree(object); … … 1268 1240 detResidExpAnalysisRow *object; 1269 1241 1270 object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", "a string",true );1242 object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", true ); 1271 1243 1272 1244 if (!object) { … … 1283 1255 } 1284 1256 if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) { 1285 psFree(object);1286 exit(EXIT_FAILURE);1287 }1288 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1289 1257 psFree(object); 1290 1258 exit(EXIT_FAILURE); -
branches/jhoblitt/ippdb/tests/insert.c
r8089 r8094 283 283 } 284 284 285 if (!p2PendingImfileInsert(dbh, "a string", "a string", "a string", "a string", "a string",-32, -32)) {285 if (!p2PendingImfileInsert(dbh, "a string", "a string", "a string", "a string", -32, -32)) { 286 286 exit(EXIT_FAILURE); 287 287 } … … 313 313 } 314 314 315 if (!p2DoneImfileInsert(dbh, "a string", "a string", "a string", "a string", "a string",-32, -32)) {315 if (!p2DoneImfileInsert(dbh, "a string", "a string", "a string", "a string", -32, -32)) { 316 316 exit(EXIT_FAILURE); 317 317 } … … 373 373 } 374 374 375 if (!detProcessedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string" , "a string")) {376 exit(EXIT_FAILURE); 377 } 378 379 psDBCleanup(dbh); 380 } 381 382 { 383 psDB *dbh; 384 385 dbh = psDBInit("localhost", "test", NULL, "test"); 386 if (!dbh) { 387 exit(EXIT_FAILURE); 388 } 389 390 if (!detStackedImfileInsert(dbh, -32, -32, "a string", "a string", "a string" , "a string")) {391 exit(EXIT_FAILURE); 392 } 393 394 psDBCleanup(dbh); 395 } 396 397 { 398 psDB *dbh; 399 400 dbh = psDBInit("localhost", "test", NULL, "test"); 401 if (!dbh) { 402 exit(EXIT_FAILURE); 403 } 404 405 if (!detNormalizedImfileInsert(dbh, -32, -32, "a string", "a string", "a string" , "a string")) {375 if (!detProcessedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string")) { 376 exit(EXIT_FAILURE); 377 } 378 379 psDBCleanup(dbh); 380 } 381 382 { 383 psDB *dbh; 384 385 dbh = psDBInit("localhost", "test", NULL, "test"); 386 if (!dbh) { 387 exit(EXIT_FAILURE); 388 } 389 390 if (!detStackedImfileInsert(dbh, -32, -32, "a string", "a string", "a string")) { 391 exit(EXIT_FAILURE); 392 } 393 394 psDBCleanup(dbh); 395 } 396 397 { 398 psDB *dbh; 399 400 dbh = psDBInit("localhost", "test", NULL, "test"); 401 if (!dbh) { 402 exit(EXIT_FAILURE); 403 } 404 405 if (!detNormalizedImfileInsert(dbh, -32, -32, "a string", "a string", "a string")) { 406 406 exit(EXIT_FAILURE); 407 407 } … … 433 433 } 434 434 435 if (!detMasterImfileInsert(dbh, -32, "a string", "a string", "a string" , "a string")) {436 exit(EXIT_FAILURE); 437 } 438 439 psDBCleanup(dbh); 440 } 441 442 { 443 psDB *dbh; 444 445 dbh = psDBInit("localhost", "test", NULL, "test"); 446 if (!dbh) { 447 exit(EXIT_FAILURE); 448 } 449 450 if (!detResidImfileAnalysisInsert(dbh, -32, -32, "a string", "a string", "a string" , "a string")) {451 exit(EXIT_FAILURE); 452 } 453 454 psDBCleanup(dbh); 455 } 456 457 { 458 psDB *dbh; 459 460 dbh = psDBInit("localhost", "test", NULL, "test"); 461 if (!dbh) { 462 exit(EXIT_FAILURE); 463 } 464 465 if (!detResidExpAnalysisInsert(dbh, -32, -32, "a string", "a string", "a string",true)) {435 if (!detMasterImfileInsert(dbh, -32, "a string", "a string", "a string")) { 436 exit(EXIT_FAILURE); 437 } 438 439 psDBCleanup(dbh); 440 } 441 442 { 443 psDB *dbh; 444 445 dbh = psDBInit("localhost", "test", NULL, "test"); 446 if (!dbh) { 447 exit(EXIT_FAILURE); 448 } 449 450 if (!detResidImfileAnalysisInsert(dbh, -32, -32, "a string", "a string", "a string")) { 451 exit(EXIT_FAILURE); 452 } 453 454 psDBCleanup(dbh); 455 } 456 457 { 458 psDB *dbh; 459 460 dbh = psDBInit("localhost", "test", NULL, "test"); 461 if (!dbh) { 462 exit(EXIT_FAILURE); 463 } 464 465 if (!detResidExpAnalysisInsert(dbh, -32, -32, "a string", "a string", true)) { 466 466 exit(EXIT_FAILURE); 467 467 } -
branches/jhoblitt/ippdb/tests/insertobject.c
r8089 r8094 410 410 } 411 411 412 object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string",-32, -32);412 object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", -32, -32); 413 413 if (!object) { 414 414 exit(EXIT_FAILURE); … … 454 454 } 455 455 456 object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string",-32, -32);456 object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", -32, -32); 457 457 if (!object) { 458 458 exit(EXIT_FAILURE); … … 542 542 } 543 543 544 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string" , "a string");544 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string"); 545 545 if (!object) { 546 546 exit(EXIT_FAILURE); … … 564 564 } 565 565 566 object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");566 object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string"); 567 567 if (!object) { 568 568 exit(EXIT_FAILURE); … … 586 586 } 587 587 588 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");588 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string"); 589 589 if (!object) { 590 590 exit(EXIT_FAILURE); … … 630 630 } 631 631 632 object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string" , "a string");632 object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string"); 633 633 if (!object) { 634 634 exit(EXIT_FAILURE); … … 652 652 } 653 653 654 object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");654 object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string"); 655 655 if (!object) { 656 656 exit(EXIT_FAILURE); … … 674 674 } 675 675 676 object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", "a string",true);676 object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", true); 677 677 if (!object) { 678 678 exit(EXIT_FAILURE); -
branches/jhoblitt/ippdb/tests/metadatafromobject.c
r8089 r8094 907 907 bool status; 908 908 909 object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string",-32, -32);909 object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", -32, -32); 910 910 if (!object) { 911 911 exit(EXIT_FAILURE); … … 931 931 exit(EXIT_FAILURE); 932 932 } 933 if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {934 psFree(md);935 exit(EXIT_FAILURE);936 }937 933 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 938 934 psFree(md); … … 1033 1029 bool status; 1034 1030 1035 object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string",-32, -32);1031 object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", -32, -32); 1036 1032 if (!object) { 1037 1033 exit(EXIT_FAILURE); … … 1057 1053 exit(EXIT_FAILURE); 1058 1054 } 1059 if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {1060 psFree(md);1061 exit(EXIT_FAILURE);1062 }1063 1055 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 1064 1056 psFree(md); … … 1257 1249 bool status; 1258 1250 1259 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string" , "a string");1251 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string"); 1260 1252 if (!object) { 1261 1253 exit(EXIT_FAILURE); … … 1285 1277 exit(EXIT_FAILURE); 1286 1278 } 1287 if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {1288 psFree(md);1289 exit(EXIT_FAILURE);1290 }1291 1279 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 1292 1280 psFree(md); … … 1302 1290 bool status; 1303 1291 1304 object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");1292 object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string"); 1305 1293 if (!object) { 1306 1294 exit(EXIT_FAILURE); … … 1330 1318 exit(EXIT_FAILURE); 1331 1319 } 1332 if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {1333 psFree(md);1334 exit(EXIT_FAILURE);1335 }1336 1320 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 1337 1321 psFree(md); … … 1347 1331 bool status; 1348 1332 1349 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");1333 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string"); 1350 1334 if (!object) { 1351 1335 exit(EXIT_FAILURE); … … 1375 1359 exit(EXIT_FAILURE); 1376 1360 } 1377 if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {1378 psFree(md);1379 exit(EXIT_FAILURE);1380 }1381 1361 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 1382 1362 psFree(md); … … 1425 1405 bool status; 1426 1406 1427 object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string" , "a string");1407 object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string"); 1428 1408 if (!object) { 1429 1409 exit(EXIT_FAILURE); … … 1449 1429 exit(EXIT_FAILURE); 1450 1430 } 1451 if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {1452 psFree(md);1453 exit(EXIT_FAILURE);1454 }1455 1431 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 1456 1432 psFree(md); … … 1466 1442 bool status; 1467 1443 1468 object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string" , "a string");1444 object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string"); 1469 1445 if (!object) { 1470 1446 exit(EXIT_FAILURE); … … 1494 1470 exit(EXIT_FAILURE); 1495 1471 } 1496 if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {1497 psFree(md);1498 exit(EXIT_FAILURE);1499 }1500 1472 if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) { 1501 1473 psFree(md); … … 1511 1483 bool status; 1512 1484 1513 object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", "a string",true);1485 object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", true); 1514 1486 if (!object) { 1515 1487 exit(EXIT_FAILURE); … … 1532 1504 } 1533 1505 if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) { 1534 psFree(md);1535 exit(EXIT_FAILURE);1536 }1537 if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {1538 1506 psFree(md); 1539 1507 exit(EXIT_FAILURE); -
branches/jhoblitt/ippdb/tests/objectfrommetadata.c
r8089 r8094 1381 1381 exit(EXIT_FAILURE); 1382 1382 } 1383 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {1384 psFree(md);1385 exit(EXIT_FAILURE);1386 }1387 1383 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) { 1388 1384 psFree(md); … … 1418 1414 exit(EXIT_FAILURE); 1419 1415 } 1420 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1421 psFree(object);1422 exit(EXIT_FAILURE);1423 }1424 1416 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 1425 1417 psFree(object); … … 1585 1577 exit(EXIT_FAILURE); 1586 1578 } 1587 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {1588 psFree(md);1589 exit(EXIT_FAILURE);1590 }1591 1579 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) { 1592 1580 psFree(md); … … 1622 1610 exit(EXIT_FAILURE); 1623 1611 } 1624 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1625 psFree(object);1626 exit(EXIT_FAILURE);1627 }1628 1612 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 1629 1613 psFree(object); … … 1941 1925 exit(EXIT_FAILURE); 1942 1926 } 1943 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {1944 psFree(md);1945 exit(EXIT_FAILURE);1946 }1947 1927 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) { 1948 1928 psFree(md); … … 1974 1954 exit(EXIT_FAILURE); 1975 1955 } 1976 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {1977 psFree(object);1978 exit(EXIT_FAILURE);1979 }1980 1956 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 1981 1957 psFree(object); … … 2007 1983 exit(EXIT_FAILURE); 2008 1984 } 2009 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {2010 psFree(md);2011 exit(EXIT_FAILURE);2012 }2013 1985 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) { 2014 1986 psFree(md); … … 2040 2012 exit(EXIT_FAILURE); 2041 2013 } 2042 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {2043 psFree(object);2044 exit(EXIT_FAILURE);2045 }2046 2014 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 2047 2015 psFree(object); … … 2073 2041 exit(EXIT_FAILURE); 2074 2042 } 2075 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {2076 psFree(md);2077 exit(EXIT_FAILURE);2078 }2079 2043 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) { 2080 2044 psFree(md); … … 2106 2070 exit(EXIT_FAILURE); 2107 2071 } 2108 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {2109 psFree(object);2110 exit(EXIT_FAILURE);2111 }2112 2072 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 2113 2073 psFree(object); … … 2177 2137 exit(EXIT_FAILURE); 2178 2138 } 2179 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {2180 psFree(md);2181 exit(EXIT_FAILURE);2182 }2183 2139 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) { 2184 2140 psFree(md); … … 2206 2162 exit(EXIT_FAILURE); 2207 2163 } 2208 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {2209 psFree(object);2210 exit(EXIT_FAILURE);2211 }2212 2164 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 2213 2165 psFree(object); … … 2239 2191 exit(EXIT_FAILURE); 2240 2192 } 2241 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {2242 psFree(md);2243 exit(EXIT_FAILURE);2244 }2245 2193 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) { 2246 2194 psFree(md); … … 2272 2220 exit(EXIT_FAILURE); 2273 2221 } 2274 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {2275 psFree(object);2276 exit(EXIT_FAILURE);2277 }2278 2222 if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) { 2279 2223 psFree(object); … … 2301 2245 exit(EXIT_FAILURE); 2302 2246 } 2303 if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {2304 psFree(md);2305 exit(EXIT_FAILURE);2306 }2307 2247 if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) { 2308 2248 psFree(md); … … 2331 2271 } 2332 2272 if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) { 2333 psFree(object);2334 exit(EXIT_FAILURE);2335 }2336 if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {2337 2273 psFree(object); 2338 2274 exit(EXIT_FAILURE); -
branches/jhoblitt/ippdb/tests/pop.c
r8089 r8094 409 409 char class_id[256]; 410 410 char uri[256]; 411 char stats[256];412 411 char recipe[256]; 413 412 psS32 p1_version; … … 419 418 } 420 419 421 if (!p2PendingImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)& stats, (char **)&recipe, &p1_version, &p2_version)) {420 if (!p2PendingImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe, &p1_version, &p2_version)) { 422 421 exit(EXIT_FAILURE); 423 422 } … … 460 459 char class_id[256]; 461 460 char uri[256]; 462 char stats[256];463 461 char recipe[256]; 464 462 psS32 p1_version; … … 470 468 } 471 469 472 if (!p2DoneImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)& stats, (char **)&recipe, &p1_version, &p2_version)) {470 if (!p2DoneImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe, &p1_version, &p2_version)) { 473 471 exit(EXIT_FAILURE); 474 472 } … … 556 554 char class_id[256]; 557 555 char uri[256]; 558 char stats[256]; 559 char recipe[256]; 560 561 dbh = psDBInit("localhost", "test", NULL, "test"); 562 if (!dbh) { 563 exit(EXIT_FAILURE); 564 } 565 566 if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&stats, (char **)&recipe)) { 556 char recipe[256]; 557 558 dbh = psDBInit("localhost", "test", NULL, "test"); 559 if (!dbh) { 560 exit(EXIT_FAILURE); 561 } 562 563 if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe)) { 567 564 exit(EXIT_FAILURE); 568 565 } … … 577 574 char class_id[256]; 578 575 char uri[256]; 579 char stats[256]; 580 char recipe[256]; 581 582 dbh = psDBInit("localhost", "test", NULL, "test"); 583 if (!dbh) { 584 exit(EXIT_FAILURE); 585 } 586 587 if (!detStackedImfilePop(dbh, &det_id, &iteration, (char **)&class_id, (char **)&uri, (char **)&stats, (char **)&recipe)) { 576 char recipe[256]; 577 578 dbh = psDBInit("localhost", "test", NULL, "test"); 579 if (!dbh) { 580 exit(EXIT_FAILURE); 581 } 582 583 if (!detStackedImfilePop(dbh, &det_id, &iteration, (char **)&class_id, (char **)&uri, (char **)&recipe)) { 588 584 exit(EXIT_FAILURE); 589 585 } … … 598 594 char class_id[256]; 599 595 char uri[256]; 600 char stats[256]; 601 char recipe[256]; 602 603 dbh = psDBInit("localhost", "test", NULL, "test"); 604 if (!dbh) { 605 exit(EXIT_FAILURE); 606 } 607 608 if (!detNormalizedImfilePop(dbh, &det_id, &iteration, (char **)&class_id, (char **)&uri, (char **)&stats, (char **)&recipe)) { 596 char recipe[256]; 597 598 dbh = psDBInit("localhost", "test", NULL, "test"); 599 if (!dbh) { 600 exit(EXIT_FAILURE); 601 } 602 603 if (!detNormalizedImfilePop(dbh, &det_id, &iteration, (char **)&class_id, (char **)&uri, (char **)&recipe)) { 609 604 exit(EXIT_FAILURE); 610 605 } … … 636 631 char class_id[256]; 637 632 char uri[256]; 638 char stats[256]; 639 char recipe[256]; 640 641 dbh = psDBInit("localhost", "test", NULL, "test"); 642 if (!dbh) { 643 exit(EXIT_FAILURE); 644 } 645 646 if (!detMasterImfilePop(dbh, &det_id, (char **)&class_id, (char **)&uri, (char **)&stats, (char **)&recipe)) { 633 char recipe[256]; 634 635 dbh = psDBInit("localhost", "test", NULL, "test"); 636 if (!dbh) { 637 exit(EXIT_FAILURE); 638 } 639 640 if (!detMasterImfilePop(dbh, &det_id, (char **)&class_id, (char **)&uri, (char **)&recipe)) { 647 641 exit(EXIT_FAILURE); 648 642 } … … 657 651 char exp_id[256]; 658 652 char class_id[256]; 659 char stats[256]; 660 char recipe[256]; 661 662 dbh = psDBInit("localhost", "test", NULL, "test"); 663 if (!dbh) { 664 exit(EXIT_FAILURE); 665 } 666 667 if (!detResidImfileAnalysisPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&class_id, (char **)&stats, (char **)&recipe)) { 653 char recipe[256]; 654 655 dbh = psDBInit("localhost", "test", NULL, "test"); 656 if (!dbh) { 657 exit(EXIT_FAILURE); 658 } 659 660 if (!detResidImfileAnalysisPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&class_id, (char **)&recipe)) { 668 661 exit(EXIT_FAILURE); 669 662 } … … 677 670 psS32 iteration; 678 671 char exp_id[256]; 679 char stats[256];680 672 char recipe[256]; 681 673 bool accept; … … 686 678 } 687 679 688 if (!detResidExpAnalysisPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)& stats, (char **)&recipe, &accept)) {680 if (!detResidExpAnalysisPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&recipe, &accept)) { 689 681 exit(EXIT_FAILURE); 690 682 }
Note:
See TracChangeset
for help on using the changeset viewer.
