IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 21, 2007, 3:59:20 PM (19 years ago)
Author:
jhoblitt
Message:

s/Scfile/Skyfile/g
s/scfile/skyfile/g
s/SCFILE/SKYFILE/g

File:
1 edited

Legend:

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

    r11979 r11985  
    3333static bool definerunMode(pxConfig *config);
    3434static bool updaterunMode(pxConfig *config);
    35 static bool addinputscfileMode(pxConfig *config);
    36 static bool inputscfileMode(pxConfig *config);
    37 static bool todiffscfileMode(pxConfig *config);
    38 static bool adddiffscfileMode(pxConfig *config);
    39 static bool diffscfileMode(pxConfig *config);
     35static bool addinputskyfileMode(pxConfig *config);
     36static bool inputskyfileMode(pxConfig *config);
     37static bool todiffskyfileMode(pxConfig *config);
     38static bool adddiffskyfileMode(pxConfig *config);
     39static bool diffskyfileMode(pxConfig *config);
    4040
    4141static bool setp5RunState(pxConfig *config, const char *p4_id, const char *state);
     
    6161        MODECASE(P5TOOL_MODE_DEFINERUN,         definerunMode);
    6262        MODECASE(P5TOOL_MODE_UPDATERUN,         updaterunMode);
    63         MODECASE(P5TOOL_MODE_ADDINPUTSCFILE,    addinputscfileMode);
    64         MODECASE(P5TOOL_MODE_INPUTSCFILE,       inputscfileMode);
    65         MODECASE(P5TOOL_MODE_TODIFFSCFILE,      todiffscfileMode);
    66         MODECASE(P5TOOL_MODE_ADDDIFFSCFILE,     adddiffscfileMode);
    67         MODECASE(P5TOOL_MODE_DIFFSCFILE,        diffscfileMode);
     63        MODECASE(P5TOOL_MODE_ADDINPUTSKYFILE,    addinputskyfileMode);
     64        MODECASE(P5TOOL_MODE_INPUTSKYFILE,       inputskyfileMode);
     65        MODECASE(P5TOOL_MODE_TODIFFSKYFILE,      todiffskyfileMode);
     66        MODECASE(P5TOOL_MODE_ADDDIFFSKYFILE,     adddiffskyfileMode);
     67        MODECASE(P5TOOL_MODE_DIFFSKYFILE,        diffskyfileMode);
    6868        default:
    6969            psAbort("invalid option (this should not happen)");
     
    219219
    220220
    221 static bool addinputscfileMode(pxConfig *config)
     221static bool addinputskyfileMode(pxConfig *config)
    222222{
    223223    PS_ASSERT_PTR_NON_NULL(config, false);
     
    280280    // XXX instead of validiting it here we should just use forgein key
    281281    // constrants
    282     if (!p5InputScfileInsert(config->dbh,
     282    if (!p5InputSkyfileInsert(config->dbh,
    283283            (psS32)atoi(p5_id),
    284284            (psS32)atoi(p4_id),
     
    296296
    297297
    298 static bool inputscfileMode(pxConfig *config)
     298static bool inputskyfileMode(pxConfig *config)
    299299{
    300300    PS_ASSERT_PTR_NON_NULL(config, false);
     
    310310    psString query = psStringCopy(
    311311        "SELECT\n"
    312         "   p4Scfile.*,\n"
    313         "   p5InputScfile.template\n"
     312        "   p4Skyfile.*,\n"
     313        "   p5InputSkyfile.template\n"
    314314        " FROM p5Run\n"
    315         " JOIN p5InputScfile\n"
     315        " JOIN p5InputSkyfile\n"
    316316        "   USING(p5_id)\n"
    317         " JOIN p4Scfile\n"
    318         "   ON p5InputScfile.p4_id      = p4Scfile.p4_id\n"
    319         "  AND p5InputScfile.skycell_id = p4Scfile.skycell_id\n"
    320         "  AND p5InputScfile.tess_id    = p4Scfile.tess_id\n"
     317        " JOIN p4Skyfile\n"
     318        "   ON p5InputSkyfile.p4_id      = p4Skyfile.p4_id\n"
     319        "  AND p5InputSkyfile.skycell_id = p4Skyfile.skycell_id\n"
     320        "  AND p5InputSkyfile.tess_id    = p4Skyfile.tess_id\n"
    321321        " WHERE\n"
    322322        "   p5Run.state = 'run'\n"
     
    324324
    325325    if (config->where) {
    326         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5InputScfile");
     326        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5InputSkyfile");
    327327        psStringAppend(&query, " AND %s", whereClause);
    328328        psFree(whereClause);
     
    358358    }
    359359    if (!psArrayLength(output)) {
    360         psError(PS_ERR_UNKNOWN, false, "no p5InputScfile rows found");
     360        psError(PS_ERR_UNKNOWN, false, "no p5InputSkyfile rows found");
    361361        psFree(output);
    362362        return true;
     
    375375    if (psArrayLength(output)) {
    376376        // negative simple so the default is true
    377         if (!ippdbPrintMetadatas(stdout, output, "p5InputScfile", !simple)) {
     377        if (!ippdbPrintMetadatas(stdout, output, "p5InputSkyfile", !simple)) {
    378378            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    379379            psFree(output);
     
    388388
    389389
    390 static bool todiffscfileMode(pxConfig *config)
     390static bool todiffskyfileMode(pxConfig *config)
    391391{
    392392    PS_ASSERT_PTR_NON_NULL(config, false);
     
    404404        "   p5Run.p5_id\n"
    405405        " FROM p5Run\n"
    406         " JOIN p5InputScfile\n"
     406        " JOIN p5InputSkyfile\n"
    407407        "   USING(p5_id)\n"
    408         " JOIN p4Scfile\n"
    409         "   ON p5InputScfile.p4_id      = p4Scfile.p4_id\n"
    410         "  AND p5InputScfile.skycell_id = p4Scfile.skycell_id\n"
    411         "  AND p5InputScfile.tess_id    = p4Scfile.tess_id\n"
    412         " LEFT JOIN p5DiffScfile\n"
    413         "   ON p5InputScfile.p5_id      = p5DiffScfile.p5_id\n"
     408        " JOIN p4Skyfile\n"
     409        "   ON p5InputSkyfile.p4_id      = p4Skyfile.p4_id\n"
     410        "  AND p5InputSkyfile.skycell_id = p4Skyfile.skycell_id\n"
     411        "  AND p5InputSkyfile.tess_id    = p4Skyfile.tess_id\n"
     412        " LEFT JOIN p5DiffSkyfile\n"
     413        "   ON p5InputSkyfile.p5_id      = p5DiffSkyfile.p5_id\n"
    414414        " WHERE\n"
    415415        "   p5Run.state = 'run'\n"
    416         "   AND p5DiffScfile.p5_id IS NULL\n"
     416        "   AND p5DiffSkyfile.p5_id IS NULL\n"
    417417    );
    418418
    419419    if (config->where) {
    420         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5Scfile");
     420        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5Skyfile");
    421421        psStringAppend(&query, " AND %s", whereClause);
    422422        psFree(whereClause);
     
    452452    }
    453453    if (!psArrayLength(output)) {
    454         psError(PS_ERR_UNKNOWN, false, "no p5Scfile rows found");
     454        psError(PS_ERR_UNKNOWN, false, "no p5Skyfile rows found");
    455455        psFree(output);
    456456        return true;
     
    469469    if (psArrayLength(output)) {
    470470        // negative simple so the default is true
    471         if (!ippdbPrintMetadatas(stdout, output, "p5Scfile", !simple)) {
     471        if (!ippdbPrintMetadatas(stdout, output, "p5Skyfile", !simple)) {
    472472            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    473473            psFree(output);
     
    482482
    483483
    484 static bool adddiffscfileMode(pxConfig *config)
     484static bool adddiffskyfileMode(pxConfig *config)
    485485{
    486486    PS_ASSERT_PTR_NON_NULL(config, false);
     
    521521
    522522
    523     if (!p5DiffScfileInsert(config->dbh,
     523    if (!p5DiffSkyfileInsert(config->dbh,
    524524            (psS32)atoi(p5_id),
    525525            uri,
     
    535535
    536536
    537 static bool diffscfileMode(pxConfig *config)
     537static bool diffskyfileMode(pxConfig *config)
    538538{
    539539    PS_ASSERT_PTR_NON_NULL(config, false);
     
    551551        "   p5Run.skycell_id,\n"
    552552        "   p5Run.tess_id,\n"
    553         "   p5DiffScfile.*\n"
     553        "   p5DiffSkyfile.*\n"
    554554        " FROM p5Run\n"
    555         " JOIN p5DiffScfile\n"
     555        " JOIN p5DiffSkyfile\n"
    556556        "   USING(p5_id)\n"
    557557        " WHERE\n"
     
    560560
    561561    if (config->where) {
    562         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5DiffScfile");
     562        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p5DiffSkyfile");
    563563        psStringAppend(&query, " AND %s", whereClause);
    564564        psFree(whereClause);
     
    594594    }
    595595    if (!psArrayLength(output)) {
    596         psError(PS_ERR_UNKNOWN, false, "no p5DiffScfile rows found");
     596        psError(PS_ERR_UNKNOWN, false, "no p5DiffSkyfile rows found");
    597597        psFree(output);
    598598        return true;
     
    611611    if (psArrayLength(output)) {
    612612        // negative simple so the default is true
    613         if (!ippdbPrintMetadatas(stdout, output, "p5DiffScfile", !simple)) {
     613        if (!ippdbPrintMetadatas(stdout, output, "p5DiffSkyfile", !simple)) {
    614614            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    615615            psFree(output);
Note: See TracChangeset for help on using the changeset viewer.