IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2008, 4:08:40 PM (18 years ago)
Author:
Paul Price
Message:

Need strings.h for strcasecmp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/src/pstampparse.c

    r16978 r17052  
    55#include <psmodules.h>
    66#include <string.h>
     7#include <strings.h>
    78#include "pstamp.h"
    89#include "pstampROI.h"
     
    135136        psError(PS_ERR_IO, false, "psFitsReadTable failed for %s", options->fileName);
    136137        return false;
    137     } 
     138    }
    138139
    139140    options->md = array->data[0];
     
    213214    //         target                               key1
    214215    //
    215     // 
     216    //
    216217    // we return an array containing strins for the values
    217218
     
    283284    }
    284285    psU64 len = psArrayLength(array);
    285    
     286
    286287    psString id = NULL;
    287288    if (len > 0) {
     
    322323        return NULL;
    323324
    324     psArray *chip_files = runQuery(options, 
     325    psArray *chip_files = runQuery(options,
    325326                        "SELECT %s from chipProcessedImfile WHERE chip_id = %s AND class_id = '%s'",
    326327                        "uri", chip_id, class_id, true, NULL);
     
    343344    psString warp_id = warpIDForCam(options, cam_id);
    344345
    345     psArray *warp_files = runQuery(options, 
     346    psArray *warp_files = runQuery(options,
    346347                        "SELECT %s from warpSkyfile WHERE warp_id = %s"
    347348                        " AND uri IS NOT NULL and (fault = 0 or fault is NULL)",
     
    384385
    385386    psU64 len = psArrayLength(stackIDs);
    386    
     387
    387388    // loop over the stack's for this exposure and add the images
    388389    for (int i = 0; i < len ; i++ ) {
     
    424425
    425426    psU64 len = psArrayLength(diffIDs);
    426    
     427
    427428    for (int i = 0; i < len ; i++ ) {
    428429        psString diff_id = (psString) diffIDs->data[i];
     
    474475            psString uri = (psString) uris->data[i];
    475476            printf("uri: %s\n", uri ? (psString) uri : "NULL uri");
    476         } 
     477        }
    477478#endif
    478479
     
    484485{
    485486    psArray *results;
    486    
     487
    487488    results = runQuery(options, "SELECT %s from rawExp WHERE exp_name = '%s'",
    488489                        "exp_id", exposure, NULL, false, NULL);
     
    603604    psString cmd = NULL;
    604605
    605     psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -job_type %s -uri %s ", 
     606    psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -job_type %s -uri %s ",
    606607        options->req_id, job_type, uri);
    607    
     608
    608609    if (outputBase != NULL) {
    609610        psStringAppend(&cmd, "-outputBase ");
    610    
     611
    611612        if (options->outputDirectory) {
    612613            psStringAppend(&cmd, "%s/", options->outputDirectory);
     
    646647        for (int i = 0; i< numURIs; i++) {
    647648            psString outputBase = NULL;
    648            
     649
    649650            // append an integer to the user_tag to get a uniqueu outputBase
    650651            psStringAppend(&outputBase, "%s_%d", user_tag, i);
     
    677678    psString    img_type = psMetadataLookupStr(NULL, options->md, "IMG_TYPE");
    678679
    679     if (! turnOffResultsFile(options)) { 
     680    if (! turnOffResultsFile(options)) {
    680681        fprintf(stderr, "failed to update resultsFile for request %" PRId64 "\n", options->req_id);
    681682        return false;
     
    700701
    701702    psString cmd = NULL;
    702     psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -job_type get_image -uri %s -outputBase %s", 
     703    psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -job_type get_image -uri %s -outputBase %s",
    703704        options->req_id, fileName, options->outputDirectory);
    704    
     705
    705706    int rstatus = system(cmd);
    706707    if (rstatus) {
     
    792793            // TODO: the ppstamp argument needs to change to class_id
    793794            // perhaps allow chip as a synonym
    794             psStringAppend(&commandArgs, " -chip %s", class_id); 
     795            psStringAppend(&commandArgs, " -chip %s", class_id);
    795796        }
    796797        psString user_tag = psMetadataLookupStr(&status, options->md, "USER_TAG");
     
    839840
    840841    // XXX: create a set of status codes to return so the
    841     // scripts can distinguish between different errors. 
     842    // scripts can distinguish between different errors.
    842843    // For example:
    843844    //      If we can't connect to the DB it's a configuration problem.
Note: See TracChangeset for help on using the changeset viewer.