IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8094


Ignore:
Timestamp:
Aug 2, 2006, 4:55:32 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.10

Location:
branches/jhoblitt/ippdb
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/jhoblitt/ippdb/configure.ac

    r8089 r8094  
    11AC_PREREQ(2.59)
    22
    3 AC_INIT([ippdb], [0.0.9], [pan-starrs.ifa.hawaii.edu])
     3AC_INIT([ippdb], [0.0.10], [pan-starrs.ifa.hawaii.edu])
    44AC_CONFIG_SRCDIR([ippdb.pc.in])
    55
  • branches/jhoblitt/ippdb/src/ippdb.c

    r8089 r8094  
    89298929static void p2PendingImfileRowFree(p2PendingImfileRow *object);
    89308930
    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)
     8931p2PendingImfileRow *p2PendingImfileRowAlloc(const char *exp_id, const char *class_id, const char *uri, const char *recipe, psS32 p1_version, psS32 p2_version)
    89328932{
    89338933    p2PendingImfileRow *object;
     
    89398939    object->class_id = psStringCopy(class_id);
    89408940    object->uri = psStringCopy(uri);
    8941     object->stats = psStringCopy(stats);
    89428941    object->recipe = psStringCopy(recipe);
    89438942    object->p1_version = p1_version;
     
    89528951    psFree(object->class_id);
    89538952    psFree(object->uri);
    8954     psFree(object->stats);
    89558953    psFree(object->recipe);
    89568954}
     
    89828980        return false;
    89838981    }
    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     }
    89898982    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) {
    89908983        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    90159008}
    90169009
    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)
     9010bool p2PendingImfileInsert(psDB * dbh, const char *exp_id, const char *class_id, const char *uri, const char *recipe, psS32 p1_version, psS32 p2_version)
    90189011{
    90199012    psMetadata      *md;
     
    90369029        return false;
    90379030    }
    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     }
    90439031    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) {
    90449032        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    90639051}
    90649052
    9065 bool p2PendingImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **stats, char **recipe, psS32 *p1_version, psS32 *p2_version)
     9053bool p2PendingImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **recipe, psS32 *p1_version, psS32 *p2_version)
    90669054{
    90679055    psArray         *rowSet;
     
    91259113        return false;
    91269114    }
    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     }
    91339115    *recipe = psMetadataLookupPtr(&status, row, "recipe");
    91349116    if (!status) {
     
    91579139bool p2PendingImfileInsertObject(psDB *dbh, p2PendingImfileRow *object)
    91589140{
    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);
    91609142}
    91619143
     
    91659147    char            class_id[256];
    91669148    char            uri[256];
    9167     char            stats[256];
    91689149    char            recipe[256];
    91699150    psS32           p1_version;
    91709151    psS32           p2_version;
    91719152
    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)) {
    91739154        psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
    91749155        return NULL;
    91759156    }
    91769157
    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);
    91789159}
    91799160
     
    92899270        return NULL;
    92909271    }
    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     }
    92969272    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) {
    92979273        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    93199295    char            *class_id;
    93209296    char            *uri;
    9321     char            *stats;
    93229297    char            *recipe;
    93239298    psS32           p1_version;
     
    93399314        return false;
    93409315    }
    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     }
    93469316    recipe = psMetadataLookupPtr(&status, md, "recipe");
    93479317    if (!status) {
     
    93609330    }
    93619331
    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);
    93639333}
    93649334psArray *p2PendingImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1011110081static void p2DoneImfileRowFree(p2DoneImfileRow *object);
    1011210082
    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)
     10083p2DoneImfileRow *p2DoneImfileRowAlloc(const char *exp_id, const char *class_id, const char *uri, const char *recipe, psS32 p1_version, psS32 p2_version)
    1011410084{
    1011510085    p2DoneImfileRow *object;
     
    1012110091    object->class_id = psStringCopy(class_id);
    1012210092    object->uri = psStringCopy(uri);
    10123     object->stats = psStringCopy(stats);
    1012410093    object->recipe = psStringCopy(recipe);
    1012510094    object->p1_version = p1_version;
     
    1013410103    psFree(object->class_id);
    1013510104    psFree(object->uri);
    10136     psFree(object->stats);
    1013710105    psFree(object->recipe);
    1013810106}
     
    1016410132        return false;
    1016510133    }
    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     }
    1017110134    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) {
    1017210135        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1019710160}
    1019810161
    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)
     10162bool p2DoneImfileInsert(psDB * dbh, const char *exp_id, const char *class_id, const char *uri, const char *recipe, psS32 p1_version, psS32 p2_version)
    1020010163{
    1020110164    psMetadata      *md;
     
    1021810181        return false;
    1021910182    }
    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     }
    1022510183    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) {
    1022610184        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1024510203}
    1024610204
    10247 bool p2DoneImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **stats, char **recipe, psS32 *p1_version, psS32 *p2_version)
     10205bool p2DoneImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **recipe, psS32 *p1_version, psS32 *p2_version)
    1024810206{
    1024910207    psArray         *rowSet;
     
    1030710265        return false;
    1030810266    }
    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     }
    1031510267    *recipe = psMetadataLookupPtr(&status, row, "recipe");
    1031610268    if (!status) {
     
    1033910291bool p2DoneImfileInsertObject(psDB *dbh, p2DoneImfileRow *object)
    1034010292{
    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);
    1034210294}
    1034310295
     
    1034710299    char            class_id[256];
    1034810300    char            uri[256];
    10349     char            stats[256];
    1035010301    char            recipe[256];
    1035110302    psS32           p1_version;
    1035210303    psS32           p2_version;
    1035310304
    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)) {
    1035510306        psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
    1035610307        return NULL;
    1035710308    }
    1035810309
    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);
    1036010311}
    1036110312
     
    1047110422        return NULL;
    1047210423    }
    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     }
    1047810424    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) {
    1047910425        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1050110447    char            *class_id;
    1050210448    char            *uri;
    10503     char            *stats;
    1050410449    char            *recipe;
    1050510450    psS32           p1_version;
     
    1052110466        return false;
    1052210467    }
    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     }
    1052810468    recipe = psMetadataLookupPtr(&status, md, "recipe");
    1052910469    if (!status) {
     
    1054210482    }
    1054310483
    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);
    1054510485}
    1054610486psArray *p2DoneImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1226612206static void detProcessedImfileRowFree(detProcessedImfileRow *object);
    1226712207
    12268 detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *stats, const char *recipe)
     12208detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *recipe)
    1226912209{
    1227012210    detProcessedImfileRow *object;
     
    1227712217    object->class_id = psStringCopy(class_id);
    1227812218    object->uri = psStringCopy(uri);
    12279     object->stats = psStringCopy(stats);
    1228012219    object->recipe = psStringCopy(recipe);
    1228112220
     
    1228812227    psFree(object->class_id);
    1228912228    psFree(object->uri);
    12290     psFree(object->stats);
    1229112229    psFree(object->recipe);
    1229212230}
     
    1232312261        return false;
    1232412262    }
    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     }
    1233012263    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) {
    1233112264        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1234612279}
    1234712280
    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)
     12281bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *recipe)
    1234912282{
    1235012283    psMetadata      *md;
     
    1237212305        return false;
    1237312306    }
    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     }
    1237912307    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) {
    1238012308        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1238912317}
    1239012318
    12391 bool detProcessedImfilePop(psDB *dbh, psS32 *det_id, char **exp_id, char **class_id, char **uri, char **stats, char **recipe)
     12319bool detProcessedImfilePop(psDB *dbh, psS32 *det_id, char **exp_id, char **class_id, char **uri, char **recipe)
    1239212320{
    1239312321    psArray         *rowSet;
     
    1245712385        return false;
    1245812386    }
    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     }
    1246512387    *recipe = psMetadataLookupPtr(&status, row, "recipe");
    1246612388    if (!status) {
     
    1247712399bool detProcessedImfileInsertObject(psDB *dbh, detProcessedImfileRow *object)
    1247812400{
    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);
    1248012402}
    1248112403
     
    1248612408    char            class_id[256];
    1248712409    char            uri[256];
    12488     char            stats[256];
    1248912410    char            recipe[256];
    1249012411
    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)) {
    1249212413        psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
    1249312414        return NULL;
    1249412415    }
    1249512416
    12496     return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, stats, recipe);
     12417    return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe);
    1249712418}
    1249812419
     
    1261312534        return NULL;
    1261412535    }
    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     }
    1262012536    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) {
    1262112537        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1263412550    char            *class_id;
    1263512551    char            *uri;
    12636     char            *stats;
    1263712552    char            *recipe;
    1263812553
     
    1265712572        return false;
    1265812573    }
    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     }
    1266412574    recipe = psMetadataLookupPtr(&status, md, "recipe");
    1266512575    if (!status) {
     
    1266812578    }
    1266912579
    12670     return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, stats, recipe);
     12580    return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe);
    1267112581}
    1267212582psArray *detProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1272612636static void detStackedImfileRowFree(detStackedImfileRow *object);
    1272712637
    12728 detStackedImfileRow *detStackedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *stats, const char *recipe)
     12638detStackedImfileRow *detStackedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe)
    1272912639{
    1273012640    detStackedImfileRow *object;
     
    1273712647    object->class_id = psStringCopy(class_id);
    1273812648    object->uri = psStringCopy(uri);
    12739     object->stats = psStringCopy(stats);
    1274012649    object->recipe = psStringCopy(recipe);
    1274112650
     
    1274712656    psFree(object->class_id);
    1274812657    psFree(object->uri);
    12749     psFree(object->stats);
    1275012658    psFree(object->recipe);
    1275112659}
     
    1278212690        return false;
    1278312691    }
    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     }
    1278912692    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) {
    1279012693        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1280512708}
    1280612709
    12807 bool detStackedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *stats, const char *recipe)
     12710bool detStackedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe)
    1280812711{
    1280912712    psMetadata      *md;
     
    1283112734        return false;
    1283212735    }
    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     }
    1283812736    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) {
    1283912737        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1284812746}
    1284912747
    12850 bool detStackedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char **stats, char **recipe)
     12748bool detStackedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char **recipe)
    1285112749{
    1285212750    psArray         *rowSet;
     
    1291612814        return false;
    1291712815    }
    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     }
    1292412816    *recipe = psMetadataLookupPtr(&status, row, "recipe");
    1292512817    if (!status) {
     
    1293612828bool detStackedImfileInsertObject(psDB *dbh, detStackedImfileRow *object)
    1293712829{
    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);
    1293912831}
    1294012832
     
    1294512837    char            class_id[256];
    1294612838    char            uri[256];
    12947     char            stats[256];
    1294812839    char            recipe[256];
    1294912840
    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)) {
    1295112842        psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
    1295212843        return NULL;
    1295312844    }
    1295412845
    12955     return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, stats, recipe);
     12846    return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, recipe);
    1295612847}
    1295712848
     
    1307212963        return NULL;
    1307312964    }
    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     }
    1307912965    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) {
    1308012966        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1309312979    char            *class_id;
    1309412980    char            *uri;
    13095     char            *stats;
    1309612981    char            *recipe;
    1309712982
     
    1311613001        return false;
    1311713002    }
    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     }
    1312313003    recipe = psMetadataLookupPtr(&status, md, "recipe");
    1312413004    if (!status) {
     
    1312713007    }
    1312813008
    13129     return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, stats, recipe);
     13009    return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, recipe);
    1313013010}
    1313113011psArray *detStackedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1318513065static void detNormalizedImfileRowFree(detNormalizedImfileRow *object);
    1318613066
    13187 detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *stats, const char *recipe)
     13067detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe)
    1318813068{
    1318913069    detNormalizedImfileRow *object;
     
    1319613076    object->class_id = psStringCopy(class_id);
    1319713077    object->uri = psStringCopy(uri);
    13198     object->stats = psStringCopy(stats);
    1319913078    object->recipe = psStringCopy(recipe);
    1320013079
     
    1320613085    psFree(object->class_id);
    1320713086    psFree(object->uri);
    13208     psFree(object->stats);
    1320913087    psFree(object->recipe);
    1321013088}
     
    1324113119        return false;
    1324213120    }
    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     }
    1324813121    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) {
    1324913122        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1326413137}
    1326513138
    13266 bool detNormalizedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *stats, const char *recipe)
     13139bool detNormalizedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe)
    1326713140{
    1326813141    psMetadata      *md;
     
    1329013163        return false;
    1329113164    }
    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     }
    1329713165    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) {
    1329813166        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1330713175}
    1330813176
    13309 bool detNormalizedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char **stats, char **recipe)
     13177bool detNormalizedImfilePop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **class_id, char **uri, char **recipe)
    1331013178{
    1331113179    psArray         *rowSet;
     
    1337513243        return false;
    1337613244    }
    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     }
    1338313245    *recipe = psMetadataLookupPtr(&status, row, "recipe");
    1338413246    if (!status) {
     
    1339513257bool detNormalizedImfileInsertObject(psDB *dbh, detNormalizedImfileRow *object)
    1339613258{
    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);
    1339813260}
    1339913261
     
    1340413266    char            class_id[256];
    1340513267    char            uri[256];
    13406     char            stats[256];
    1340713268    char            recipe[256];
    1340813269
    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)) {
    1341013271        psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
    1341113272        return NULL;
    1341213273    }
    1341313274
    13414     return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, stats, recipe);
     13275    return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, recipe);
    1341513276}
    1341613277
     
    1353113392        return NULL;
    1353213393    }
    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     }
    1353813394    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) {
    1353913395        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1355213408    char            *class_id;
    1355313409    char            *uri;
    13554     char            *stats;
    1355513410    char            *recipe;
    1355613411
     
    1357513430        return false;
    1357613431    }
    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     }
    1358213432    recipe = psMetadataLookupPtr(&status, md, "recipe");
    1358313433    if (!status) {
     
    1358613436    }
    1358713437
    13588     return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, stats, recipe);
     13438    return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, recipe);
    1358913439}
    1359013440psArray *detNormalizedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1401313863static void detMasterImfileRowFree(detMasterImfileRow *object);
    1401413864
    14015 detMasterImfileRow *detMasterImfileRowAlloc(psS32 det_id, const char *class_id, const char *uri, const char *stats, const char *recipe)
     13865detMasterImfileRow *detMasterImfileRowAlloc(psS32 det_id, const char *class_id, const char *uri, const char *recipe)
    1401613866{
    1401713867    detMasterImfileRow *object;
     
    1402313873    object->class_id = psStringCopy(class_id);
    1402413874    object->uri = psStringCopy(uri);
    14025     object->stats = psStringCopy(stats);
    1402613875    object->recipe = psStringCopy(recipe);
    1402713876
     
    1403313882    psFree(object->class_id);
    1403413883    psFree(object->uri);
    14035     psFree(object->stats);
    1403613884    psFree(object->recipe);
    1403713885}
     
    1406313911        return false;
    1406413912    }
    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     }
    1407013913    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) {
    1407113914        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1408613929}
    1408713930
    14088 bool detMasterImfileInsert(psDB * dbh, psS32 det_id, const char *class_id, const char *uri, const char *stats, const char *recipe)
     13931bool detMasterImfileInsert(psDB * dbh, psS32 det_id, const char *class_id, const char *uri, const char *recipe)
    1408913932{
    1409013933    psMetadata      *md;
     
    1410713950        return false;
    1410813951    }
    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     }
    1411413952    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) {
    1411513953        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1412413962}
    1412513963
    14126 bool detMasterImfilePop(psDB *dbh, psS32 *det_id, char **class_id, char **uri, char **stats, char **recipe)
     13964bool detMasterImfilePop(psDB *dbh, psS32 *det_id, char **class_id, char **uri, char **recipe)
    1412713965{
    1412813966    psArray         *rowSet;
     
    1418614024        return false;
    1418714025    }
    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     }
    1419414026    *recipe = psMetadataLookupPtr(&status, row, "recipe");
    1419514027    if (!status) {
     
    1420614038bool detMasterImfileInsertObject(psDB *dbh, detMasterImfileRow *object)
    1420714039{
    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);
    1420914041}
    1421014042
     
    1421414046    char            class_id[256];
    1421514047    char            uri[256];
    14216     char            stats[256];
    1421714048    char            recipe[256];
    1421814049
    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)) {
    1422014051        psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
    1422114052        return NULL;
    1422214053    }
    1422314054
    14224     return detMasterImfileRowAlloc(det_id, class_id, uri, stats, recipe);
     14055    return detMasterImfileRowAlloc(det_id, class_id, uri, recipe);
    1422514056}
    1422614057
     
    1433614167        return NULL;
    1433714168    }
    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     }
    1434314169    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) {
    1434414170        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1435614182    char            *class_id;
    1435714183    char            *uri;
    14358     char            *stats;
    1435914184    char            *recipe;
    1436014185
     
    1437414199        return false;
    1437514200    }
    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     }
    1438114201    recipe = psMetadataLookupPtr(&status, md, "recipe");
    1438214202    if (!status) {
     
    1438514205    }
    1438614206
    14387     return detMasterImfileRowAlloc(det_id, class_id, uri, stats, recipe);
     14207    return detMasterImfileRowAlloc(det_id, class_id, uri, recipe);
    1438814208}
    1438914209psArray *detMasterImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1444314263static void detResidImfileAnalysisRowFree(detResidImfileAnalysisRow *object);
    1444414264
    14445 detResidImfileAnalysisRow *detResidImfileAnalysisRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *class_id, const char *stats, const char *recipe)
     14265detResidImfileAnalysisRow *detResidImfileAnalysisRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *class_id, const char *recipe)
    1444614266{
    1444714267    detResidImfileAnalysisRow *object;
     
    1445414274    object->exp_id = psStringCopy(exp_id);
    1445514275    object->class_id = psStringCopy(class_id);
    14456     object->stats = psStringCopy(stats);
    1445714276    object->recipe = psStringCopy(recipe);
    1445814277
     
    1446414283    psFree(object->exp_id);
    1446514284    psFree(object->class_id);
    14466     psFree(object->stats);
    1446714285    psFree(object->recipe);
    1446814286}
     
    1449914317        return false;
    1450014318    }
    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     }
    1450614319    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) {
    1450714320        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1452214335}
    1452314336
    14524 bool detResidImfileAnalysisInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *class_id, const char *stats, const char *recipe)
     14337bool detResidImfileAnalysisInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *class_id, const char *recipe)
    1452514338{
    1452614339    psMetadata      *md;
     
    1454814361        return false;
    1454914362    }
    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     }
    1455514363    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) {
    1455614364        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1456514373}
    1456614374
    14567 bool detResidImfileAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **class_id, char **stats, char **recipe)
     14375bool detResidImfileAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **class_id, char **recipe)
    1456814376{
    1456914377    psArray         *rowSet;
     
    1463314441        return false;
    1463414442    }
    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     }
    1464114443    *recipe = psMetadataLookupPtr(&status, row, "recipe");
    1464214444    if (!status) {
     
    1465314455bool detResidImfileAnalysisInsertObject(psDB *dbh, detResidImfileAnalysisRow *object)
    1465414456{
    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);
    1465614458}
    1465714459
     
    1466214464    char            exp_id[256];
    1466314465    char            class_id[256];
    14664     char            stats[256];
    1466514466    char            recipe[256];
    1466614467
    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)) {
    1466814469        psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
    1466914470        return NULL;
    1467014471    }
    1467114472
    14672     return detResidImfileAnalysisRowAlloc(det_id, iteration, exp_id, class_id, stats, recipe);
     14473    return detResidImfileAnalysisRowAlloc(det_id, iteration, exp_id, class_id, recipe);
    1467314474}
    1467414475
     
    1478914590        return NULL;
    1479014591    }
    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     }
    1479614592    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) {
    1479714593        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1481014606    char            *exp_id;
    1481114607    char            *class_id;
    14812     char            *stats;
    1481314608    char            *recipe;
    1481414609
     
    1483314628        return false;
    1483414629    }
    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     }
    1484014630    recipe = psMetadataLookupPtr(&status, md, "recipe");
    1484114631    if (!status) {
     
    1484414634    }
    1484514635
    14846     return detResidImfileAnalysisRowAlloc(det_id, iteration, exp_id, class_id, stats, recipe);
     14636    return detResidImfileAnalysisRowAlloc(det_id, iteration, exp_id, class_id, recipe);
    1484714637}
    1484814638psArray *detResidImfileAnalysisSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1490214692static void detResidExpAnalysisRowFree(detResidExpAnalysisRow *object);
    1490314693
    14904 detResidExpAnalysisRow *detResidExpAnalysisRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *stats, const char *recipe, bool accept)
     14694detResidExpAnalysisRow *detResidExpAnalysisRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *recipe, bool accept)
    1490514695{
    1490614696    detResidExpAnalysisRow *object;
     
    1491214702    object->iteration = iteration;
    1491314703    object->exp_id = psStringCopy(exp_id);
    14914     object->stats = psStringCopy(stats);
    1491514704    object->recipe = psStringCopy(recipe);
    1491614705    object->accept = accept;
     
    1492214711{
    1492314712    psFree(object->exp_id);
    14924     psFree(object->stats);
    1492514713    psFree(object->recipe);
    1492614714}
     
    1495214740        return false;
    1495314741    }
    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     }
    1495914742    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "64")) {
    1496014743        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1498014763}
    1498114764
    14982 bool detResidExpAnalysisInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *stats, const char *recipe, bool accept)
     14765bool detResidExpAnalysisInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *recipe, bool accept)
    1498314766{
    1498414767    psMetadata      *md;
     
    1500114784        return false;
    1500214785    }
    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     }
    1500814786    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, recipe)) {
    1500914787        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1502314801}
    1502414802
    15025 bool detResidExpAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **stats, char **recipe, bool *accept)
     14803bool detResidExpAnalysisPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **recipe, bool *accept)
    1502614804{
    1502714805    psArray         *rowSet;
     
    1508514863        return false;
    1508614864    }
    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     }
    1509314865    *recipe = psMetadataLookupPtr(&status, row, "recipe");
    1509414866    if (!status) {
     
    1511114883bool detResidExpAnalysisInsertObject(psDB *dbh, detResidExpAnalysisRow *object)
    1511214884{
    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);
    1511414886}
    1511514887
     
    1511914891    psS32           iteration;
    1512014892    char            exp_id[256];
    15121     char            stats[256];
    1512214893    char            recipe[256];
    1512314894    bool            accept;
    1512414895
    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)) {
    1512614897        psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
    1512714898        return NULL;
    1512814899    }
    1512914900
    15130     return detResidExpAnalysisRowAlloc(det_id, iteration, exp_id, stats, recipe, accept);
     14901    return detResidExpAnalysisRowAlloc(det_id, iteration, exp_id, recipe, accept);
    1513114902}
    1513214903
     
    1524215013        return NULL;
    1524315014    }
    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     }
    1524915015    if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, object->recipe)) {
    1525015016        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     
    1526715033    psS32           iteration;
    1526815034    char            *exp_id;
    15269     char            *stats;
    1527015035    char            *recipe;
    1527115036    bool            accept;
     
    1528615051        return false;
    1528715052    }
    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     }
    1529315053    recipe = psMetadataLookupPtr(&status, md, "recipe");
    1529415054    if (!status) {
     
    1530215062    }
    1530315063
    15304     return detResidExpAnalysisRowAlloc(det_id, iteration, exp_id, stats, recipe, accept);
     15064    return detResidExpAnalysisRowAlloc(det_id, iteration, exp_id, recipe, accept);
    1530515065}
    1530615066psArray *detResidExpAnalysisSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
  • branches/jhoblitt/ippdb/src/ippdb.h

    r8089 r8094  
    34903490    char            *class_id;
    34913491    char            *uri;
    3492     char            *stats;
    34933492    char            *recipe;
    34943493    psS32           p1_version;
     
    35053504    const char      *class_id,
    35063505    const char      *uri,
    3507     const char      *stats,
    35083506    const char      *recipe,
    35093507    psS32           p1_version,
     
    35413539    const char      *class_id,
    35423540    const char      *uri,
    3543     const char      *stats,
    35443541    const char      *recipe,
    35453542    psS32           p1_version,
     
    35573554    char            **class_id,
    35583555    char            **uri,
    3559     char            **stats,
    35603556    char            **recipe,
    35613557    psS32           *p1_version,
     
    39003896    char            *class_id;
    39013897    char            *uri;
    3902     char            *stats;
    39033898    char            *recipe;
    39043899    psS32           p1_version;
     
    39153910    const char      *class_id,
    39163911    const char      *uri,
    3917     const char      *stats,
    39183912    const char      *recipe,
    39193913    psS32           p1_version,
     
    39513945    const char      *class_id,
    39523946    const char      *uri,
    3953     const char      *stats,
    39543947    const char      *recipe,
    39553948    psS32           p1_version,
     
    39673960    char            **class_id,
    39683961    char            **uri,
    3969     char            **stats,
    39703962    char            **recipe,
    39713963    psS32           *p1_version,
     
    46934685    char            *class_id;
    46944686    char            *uri;
    4695     char            *stats;
    46964687    char            *recipe;
    46974688} detProcessedImfileRow;
     
    47074698    const char      *class_id,
    47084699    const char      *uri,
    4709     const char      *stats,
    47104700    const char      *recipe
    47114701);
     
    47424732    const char      *class_id,
    47434733    const char      *uri,
    4744     const char      *stats,
    47454734    const char      *recipe
    47464735);
     
    47574746    char            **class_id,
    47584747    char            **uri,
    4759     char            **stats,
    47604748    char            **recipe
    47614749);
     
    48804868    char            *class_id;
    48814869    char            *uri;
    4882     char            *stats;
    48834870    char            *recipe;
    48844871} detStackedImfileRow;
     
    48944881    const char      *class_id,
    48954882    const char      *uri,
    4896     const char      *stats,
    48974883    const char      *recipe
    48984884);
     
    49294915    const char      *class_id,
    49304916    const char      *uri,
    4931     const char      *stats,
    49324917    const char      *recipe
    49334918);
     
    49444929    char            **class_id,
    49454930    char            **uri,
    4946     char            **stats,
    49474931    char            **recipe
    49484932);
     
    50675051    char            *class_id;
    50685052    char            *uri;
    5069     char            *stats;
    50705053    char            *recipe;
    50715054} detNormalizedImfileRow;
     
    50815064    const char      *class_id,
    50825065    const char      *uri,
    5083     const char      *stats,
    50845066    const char      *recipe
    50855067);
     
    51165098    const char      *class_id,
    51175099    const char      *uri,
    5118     const char      *stats,
    51195100    const char      *recipe
    51205101);
     
    51315112    char            **class_id,
    51325113    char            **uri,
    5133     char            **stats,
    51345114    char            **recipe
    51355115);
     
    54285408    char            *class_id;
    54295409    char            *uri;
    5430     char            *stats;
    54315410    char            *recipe;
    54325411} detMasterImfileRow;
     
    54415420    const char      *class_id,
    54425421    const char      *uri,
    5443     const char      *stats,
    54445422    const char      *recipe
    54455423);
     
    54755453    const char      *class_id,
    54765454    const char      *uri,
    5477     const char      *stats,
    54785455    const char      *recipe
    54795456);
     
    54895466    char            **class_id,
    54905467    char            **uri,
    5491     char            **stats,
    54925468    char            **recipe
    54935469);
     
    56125588    char            *exp_id;
    56135589    char            *class_id;
    5614     char            *stats;
    56155590    char            *recipe;
    56165591} detResidImfileAnalysisRow;
     
    56265601    const char      *exp_id,
    56275602    const char      *class_id,
    5628     const char      *stats,
    56295603    const char      *recipe
    56305604);
     
    56615635    const char      *exp_id,
    56625636    const char      *class_id,
    5663     const char      *stats,
    56645637    const char      *recipe
    56655638);
     
    56765649    char            **exp_id,
    56775650    char            **class_id,
    5678     char            **stats,
    56795651    char            **recipe
    56805652);
     
    57985770    psS32           iteration;
    57995771    char            *exp_id;
    5800     char            *stats;
    58015772    char            *recipe;
    58025773    bool            accept;
     
    58125783    psS32           iteration,
    58135784    const char      *exp_id,
    5814     const char      *stats,
    58155785    const char      *recipe,
    58165786    bool            accept
     
    58475817    psS32           iteration,
    58485818    const char      *exp_id,
    5849     const char      *stats,
    58505819    const char      *recipe,
    58515820    bool            accept
     
    58625831    psS32           *iteration,
    58635832    char            **exp_id,
    5864     char            **stats,
    58655833    char            **recipe,
    58665834    bool            *accept
  • branches/jhoblitt/ippdb/tests/alloc.c

    r8089 r8094  
    760760        p2PendingImfileRow *object;
    761761
    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    );
    763763
    764764        if (!object) {
     
    778778            exit(EXIT_FAILURE);
    779779        }
    780         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    781             psFree(object);
    782             exit(EXIT_FAILURE);
    783         }
    784780        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    785781            psFree(object);
     
    870866        p2DoneImfileRow *object;
    871867
    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    );
    873869
    874870        if (!object) {
     
    888884            exit(EXIT_FAILURE);
    889885        }
    890         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    891             psFree(object);
    892             exit(EXIT_FAILURE);
    893         }
    894886        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    895887            psFree(object);
     
    10621054        detProcessedImfileRow *object;
    10631055
    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"    );
    10651057
    10661058        if (!object) {
     
    10841076            exit(EXIT_FAILURE);
    10851077        }
    1086         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    1087             psFree(object);
    1088             exit(EXIT_FAILURE);
    1089         }
    10901078        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    10911079            psFree(object);
     
    10991087        detStackedImfileRow *object;
    11001088
    1101         object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string"    );
     1089        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string"    );
    11021090
    11031091        if (!object) {
     
    11211109            exit(EXIT_FAILURE);
    11221110        }
    1123         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    1124             psFree(object);
    1125             exit(EXIT_FAILURE);
    1126         }
    11271111        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    11281112            psFree(object);
     
    11361120        detNormalizedImfileRow *object;
    11371121
    1138         object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string"    );
     1122        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string"    );
    11391123
    11401124        if (!object) {
     
    11581142            exit(EXIT_FAILURE);
    11591143        }
    1160         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    1161             psFree(object);
    1162             exit(EXIT_FAILURE);
    1163         }
    11641144        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    11651145            psFree(object);
     
    11981178        detMasterImfileRow *object;
    11991179
    1200         object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string", "a string"    );
     1180        object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string"    );
    12011181
    12021182        if (!object) {
     
    12161196            exit(EXIT_FAILURE);
    12171197        }
    1218         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    1219             psFree(object);
    1220             exit(EXIT_FAILURE);
    1221         }
    12221198        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    12231199            psFree(object);
     
    12311207        detResidImfileAnalysisRow *object;
    12321208
    1233         object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string", "a string"    );
     1209        object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string"    );
    12341210
    12351211        if (!object) {
     
    12531229            exit(EXIT_FAILURE);
    12541230        }
    1255         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    1256             psFree(object);
    1257             exit(EXIT_FAILURE);
    1258         }
    12591231        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    12601232            psFree(object);
     
    12681240        detResidExpAnalysisRow *object;
    12691241
    1270         object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", "a string", true    );
     1242        object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", true    );
    12711243
    12721244        if (!object) {
     
    12831255        }
    12841256        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)) {
    12891257            psFree(object);
    12901258            exit(EXIT_FAILURE);
  • branches/jhoblitt/ippdb/tests/insert.c

    r8089 r8094  
    283283        }
    284284
    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)) {
    286286            exit(EXIT_FAILURE);
    287287        }
     
    313313        }
    314314
    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)) {
    316316            exit(EXIT_FAILURE);
    317317        }
     
    373373        }
    374374
    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")) {
    406406            exit(EXIT_FAILURE);
    407407        }
     
    433433        }
    434434
    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)) {
    466466            exit(EXIT_FAILURE);
    467467        }
  • branches/jhoblitt/ippdb/tests/insertobject.c

    r8089 r8094  
    410410        }
    411411
    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);
    413413        if (!object) {
    414414            exit(EXIT_FAILURE);
     
    454454        }
    455455
    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);
    457457        if (!object) {
    458458            exit(EXIT_FAILURE);
     
    542542        }
    543543
    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");
    545545        if (!object) {
    546546            exit(EXIT_FAILURE);
     
    564564        }
    565565
    566         object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
     566        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string");
    567567        if (!object) {
    568568            exit(EXIT_FAILURE);
     
    586586        }
    587587
    588         object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
     588        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string");
    589589        if (!object) {
    590590            exit(EXIT_FAILURE);
     
    630630        }
    631631
    632         object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string", "a string");
     632        object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string");
    633633        if (!object) {
    634634            exit(EXIT_FAILURE);
     
    652652        }
    653653
    654         object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
     654        object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string");
    655655        if (!object) {
    656656            exit(EXIT_FAILURE);
     
    674674        }
    675675
    676         object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", "a string", true);
     676        object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", true);
    677677        if (!object) {
    678678            exit(EXIT_FAILURE);
  • branches/jhoblitt/ippdb/tests/metadatafromobject.c

    r8089 r8094  
    907907        bool            status;
    908908
    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);
    910910        if (!object) {
    911911            exit(EXIT_FAILURE);
     
    931931            exit(EXIT_FAILURE);
    932932        }
    933         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    934             psFree(md);
    935             exit(EXIT_FAILURE);
    936         }
    937933        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    938934            psFree(md);
     
    10331029        bool            status;
    10341030
    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);
    10361032        if (!object) {
    10371033            exit(EXIT_FAILURE);
     
    10571053            exit(EXIT_FAILURE);
    10581054        }
    1059         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    1060             psFree(md);
    1061             exit(EXIT_FAILURE);
    1062         }
    10631055        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    10641056            psFree(md);
     
    12571249        bool            status;
    12581250
    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");
    12601252        if (!object) {
    12611253            exit(EXIT_FAILURE);
     
    12851277            exit(EXIT_FAILURE);
    12861278        }
    1287         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    1288             psFree(md);
    1289             exit(EXIT_FAILURE);
    1290         }
    12911279        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    12921280            psFree(md);
     
    13021290        bool            status;
    13031291
    1304         object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
     1292        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string");
    13051293        if (!object) {
    13061294            exit(EXIT_FAILURE);
     
    13301318            exit(EXIT_FAILURE);
    13311319        }
    1332         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    1333             psFree(md);
    1334             exit(EXIT_FAILURE);
    1335         }
    13361320        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    13371321            psFree(md);
     
    13471331        bool            status;
    13481332
    1349         object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
     1333        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string");
    13501334        if (!object) {
    13511335            exit(EXIT_FAILURE);
     
    13751359            exit(EXIT_FAILURE);
    13761360        }
    1377         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    1378             psFree(md);
    1379             exit(EXIT_FAILURE);
    1380         }
    13811361        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    13821362            psFree(md);
     
    14251405        bool            status;
    14261406
    1427         object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string", "a string");
     1407        object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string");
    14281408        if (!object) {
    14291409            exit(EXIT_FAILURE);
     
    14491429            exit(EXIT_FAILURE);
    14501430        }
    1451         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    1452             psFree(md);
    1453             exit(EXIT_FAILURE);
    1454         }
    14551431        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    14561432            psFree(md);
     
    14661442        bool            status;
    14671443
    1468         object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
     1444        object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string");
    14691445        if (!object) {
    14701446            exit(EXIT_FAILURE);
     
    14941470            exit(EXIT_FAILURE);
    14951471        }
    1496         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    1497             psFree(md);
    1498             exit(EXIT_FAILURE);
    1499         }
    15001472        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    15011473            psFree(md);
     
    15111483        bool            status;
    15121484
    1513         object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", "a string", true);
     1485        object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", true);
    15141486        if (!object) {
    15151487            exit(EXIT_FAILURE);
     
    15321504        }
    15331505        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)) {
    15381506            psFree(md);
    15391507            exit(EXIT_FAILURE);
  • branches/jhoblitt/ippdb/tests/objectfrommetadata.c

    r8089 r8094  
    13811381            exit(EXIT_FAILURE);
    13821382        }
    1383         if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
    1384             psFree(md);
    1385             exit(EXIT_FAILURE);
    1386         }
    13871383        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
    13881384            psFree(md);
     
    14181414            exit(EXIT_FAILURE);
    14191415        }
    1420         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    1421             psFree(object);
    1422             exit(EXIT_FAILURE);
    1423         }
    14241416        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    14251417            psFree(object);
     
    15851577            exit(EXIT_FAILURE);
    15861578        }
    1587         if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
    1588             psFree(md);
    1589             exit(EXIT_FAILURE);
    1590         }
    15911579        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
    15921580            psFree(md);
     
    16221610            exit(EXIT_FAILURE);
    16231611        }
    1624         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    1625             psFree(object);
    1626             exit(EXIT_FAILURE);
    1627         }
    16281612        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    16291613            psFree(object);
     
    19411925            exit(EXIT_FAILURE);
    19421926        }
    1943         if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
    1944             psFree(md);
    1945             exit(EXIT_FAILURE);
    1946         }
    19471927        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
    19481928            psFree(md);
     
    19741954            exit(EXIT_FAILURE);
    19751955        }
    1976         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    1977             psFree(object);
    1978             exit(EXIT_FAILURE);
    1979         }
    19801956        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    19811957            psFree(object);
     
    20071983            exit(EXIT_FAILURE);
    20081984        }
    2009         if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
    2010             psFree(md);
    2011             exit(EXIT_FAILURE);
    2012         }
    20131985        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
    20141986            psFree(md);
     
    20402012            exit(EXIT_FAILURE);
    20412013        }
    2042         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    2043             psFree(object);
    2044             exit(EXIT_FAILURE);
    2045         }
    20462014        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    20472015            psFree(object);
     
    20732041            exit(EXIT_FAILURE);
    20742042        }
    2075         if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
    2076             psFree(md);
    2077             exit(EXIT_FAILURE);
    2078         }
    20792043        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
    20802044            psFree(md);
     
    21062070            exit(EXIT_FAILURE);
    21072071        }
    2108         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    2109             psFree(object);
    2110             exit(EXIT_FAILURE);
    2111         }
    21122072        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    21132073            psFree(object);
     
    21772137            exit(EXIT_FAILURE);
    21782138        }
    2179         if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
    2180             psFree(md);
    2181             exit(EXIT_FAILURE);
    2182         }
    21832139        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
    21842140            psFree(md);
     
    22062162            exit(EXIT_FAILURE);
    22072163        }
    2208         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    2209             psFree(object);
    2210             exit(EXIT_FAILURE);
    2211         }
    22122164        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    22132165            psFree(object);
     
    22392191            exit(EXIT_FAILURE);
    22402192        }
    2241         if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
    2242             psFree(md);
    2243             exit(EXIT_FAILURE);
    2244         }
    22452193        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
    22462194            psFree(md);
     
    22722220            exit(EXIT_FAILURE);
    22732221        }
    2274         if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
    2275             psFree(object);
    2276             exit(EXIT_FAILURE);
    2277         }
    22782222        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
    22792223            psFree(object);
     
    23012245            exit(EXIT_FAILURE);
    23022246        }
    2303         if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
    2304             psFree(md);
    2305             exit(EXIT_FAILURE);
    2306         }
    23072247        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
    23082248            psFree(md);
     
    23312271        }
    23322272        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)) {
    23372273            psFree(object);
    23382274            exit(EXIT_FAILURE);
  • branches/jhoblitt/ippdb/tests/pop.c

    r8089 r8094  
    409409        char            class_id[256];
    410410        char            uri[256];
    411         char            stats[256];
    412411        char            recipe[256];
    413412        psS32           p1_version;
     
    419418        }
    420419
    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)) {
    422421            exit(EXIT_FAILURE);
    423422        }
     
    460459        char            class_id[256];
    461460        char            uri[256];
    462         char            stats[256];
    463461        char            recipe[256];
    464462        psS32           p1_version;
     
    470468        }
    471469
    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)) {
    473471            exit(EXIT_FAILURE);
    474472        }
     
    556554        char            class_id[256];
    557555        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)) {
    567564            exit(EXIT_FAILURE);
    568565        }
     
    577574        char            class_id[256];
    578575        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)) {
    588584            exit(EXIT_FAILURE);
    589585        }
     
    598594        char            class_id[256];
    599595        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)) {
    609604            exit(EXIT_FAILURE);
    610605        }
     
    636631        char            class_id[256];
    637632        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)) {
    647641            exit(EXIT_FAILURE);
    648642        }
     
    657651        char            exp_id[256];
    658652        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)) {
    668661            exit(EXIT_FAILURE);
    669662        }
     
    677670        psS32           iteration;
    678671        char            exp_id[256];
    679         char            stats[256];
    680672        char            recipe[256];
    681673        bool            accept;
     
    686678        }
    687679
    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)) {
    689681            exit(EXIT_FAILURE);
    690682        }
Note: See TracChangeset for help on using the changeset viewer.