IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8849 for trunk/ippTools/src


Ignore:
Timestamp:
Sep 19, 2006, 5:20:04 PM (20 years ago)
Author:
Paul Price
Message:

Adding string.h where required

Location:
trunk/ippTools/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src

    • Property svn:ignore
      •  

        old new  
        1010*.lo
        1111p0tool
        12 p1search
        13 p2search
         12p1tool
         13p2tool
        1414pxadmin
        1515pzgetexp
        1616pzgetimfiles
        17 pzsearch
         17pztool
        1818dettool
        1919pxinject
  • trunk/ippTools/src/.cvsignore

    r8323 r8849  
    1010*.lo
    1111p0tool
    12 p1search
    13 p2search
     12p1tool
     13p2tool
    1414pxadmin
    1515pzgetexp
    1616pzgetimfiles
    17 pzsearch
     17pztool
    1818dettool
    1919pxinject
  • trunk/ippTools/src/chiptool.c

    r8667 r8849  
    33#endif
    44
     5#include <stdio.h>
     6#include <string.h>
    57#include <stdlib.h>
    68
     
    8183    }
    8284    psArray *pendingFrames = p2PendingFrameSearch(config);
    83     // XXX compare raw frames to pending frames and remove duplicate 
     85    // XXX compare raw frames to pending frames and remove duplicate
    8486    // frames from the raw set.  This may not be quiet right as it's
    8587    // possible (likely?) that a rawScienceExp is inserted into the
     
    9799                    i--;
    98100                    break;
    99                 } 
     101                }
    100102            }
    101103        }
     
    116118                        i--;
    117119                        break;
    118                     } 
     120                    }
    119121                }
    120122            }
     
    181183    // the p2ProcessedeImfile tables
    182184    // remove corresponding entries from the
    183     // p2PendingImfile table 
     185    // p2PendingImfile table
    184186    // check to see if any p2PendingExps have no
    185     // associated p2PendingImfiles 
     187    // associated p2PendingImfiles
    186188    // if so move the p2PendingExp(s) to p2ProcessedExp
    187    
     189
    188190    psString query = psStringCopy(
    189191        "SELECT DISTINCT"
     
    198200    {
    199201        psMetadata *where = psMetadataAlloc();
    200         bool status = false;       
     202        bool status = false;
    201203        psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");        if (!status) {
    202204            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id");
     
    319321    }
    320322
    321     // point of no return for p2PendingImfile -> p2ProcessedImfile 
     323    // point of no return for p2PendingImfile -> p2ProcessedImfile
    322324    // point of no return for p2PendingExp -> p2ProcessedExp
    323325    if (!psDBCommit(config->dbh)) {
     
    333335    PS_ASSERT_PTR_NON_NULL(config, false);
    334336
    335     // look for completed p2PendingExp 
     337    // look for completed p2PendingExp
    336338    // migrate them to p2ProccessedExp & p3PendingExp
    337339
    338340    // select * from p2PendingExp
    339     // where exp_id is not in p2ProcessedExp 
     341    // where exp_id is not in p2ProcessedExp
    340342    // where exp_id is not in p2PendingImfile
    341343    // where the number of entries in p2ProccessedImfile matches the .imfiles
  • trunk/ippTools/src/dettool.c

    r8657 r8849  
    33#endif
    44
     5#include <stdio.h>
     6#include <string.h>
    57#include <stdlib.h>
    68#include <ippdb.h>
  • trunk/ippTools/src/pxtables.c

    r8661 r8849  
    33#endif
    44
     5#include <stdio.h>
     6#include <string.h>
     7#include <pslib.h>
    58#include "pxtools.h"
    69
  • trunk/ippTools/src/pzgetexp.c

    r8733 r8849  
    33#endif
    44
     5#include <stdio.h>
     6#include <string.h>
    57#include <stdlib.h>
    6 #include <stdio.h>
    78
    89#include "pxtools.h"
     
    2324    // a metadatadb function to retrun the last entry without removing it from
    2425    // the database
    25     psArray *summitExps = summitExpSelectRowObjects(config->dbh, NULL, 0); 
     26    psArray *summitExps = summitExpSelectRowObjects(config->dbh, NULL, 0);
    2627    if (summitExps) {
    2728        haveLastFileSet = true;
     
    3132
    3233    // invoke dsproductls
    33     // dsproductls --uri <> --last_fileset <> 
     34    // dsproductls --uri <> --last_fileset <>
    3435    bool status = false;
    3536    psString uri = psMetadataLookupStr(&status, config->args, "-uri");
     
    138139        char *uri       = psListGetAndIncrement(tokenCursor);
    139140        char *exp_id    = psListGetAndIncrement(tokenCursor); // fileset
    140         char *time      = psListGetAndIncrement(tokenCursor); // datetime 
     141        char *time      = psListGetAndIncrement(tokenCursor); // datetime
    141142        char *exp_type  = psListGetAndIncrement(tokenCursor); // type
    142143
     
    162163        psArrayAdd(summitExps, 0, row);
    163164    }
    164    
     165
    165166    psFree(lineCursor);
    166167    psFree(doc);
  • trunk/ippTools/src/pzgetexpConfig.c

    r7027 r8849  
    33#endif
    44
     5#include <stdio.h>
     6#include <string.h>
     7#include <pslib.h>
    58#include <pmConfig.h>
    69
  • trunk/ippTools/src/pzgetimfiles.c

    r7365 r8849  
    33#endif
    44
     5#include <stdio.h>
     6#include <string.h>
    57#include <stdlib.h>
    6 #include <stdio.h>
    78
    89#include "pxtools.h"
     
    4748    if (!newImfiles) {
    4849        // XXX not nessicarily an error
    49         psError(PS_ERR_UNKNOWN, true, "no new files/imfiles"); 
     50        psError(PS_ERR_UNKNOWN, true, "no new files/imfiles");
    5051        goto FAIL;
    5152    }
     
    110111                "failed to find summitExp with exp_id %s (should not happen)"
    111112                , exp_id);
    112             goto FAIL; 
     113            goto FAIL;
    113114        }
    114115    }
    115116
    116117    // insert a new pzPendingExp
    117     summitExpRow *summitExp = summitExps->data[0]; 
     118    summitExpRow *summitExp = summitExps->data[0];
    118119    pzPendingExpRow *pzPendingExp = pzPendingExpRowAlloc(
    119120        summitExp->exp_id,
     
    121122        summitExp->telescope,
    122123        summitExp->exp_type,
    123         nImfiles 
     124        nImfiles
    124125    );
    125126    psFree(summitExps);
  • trunk/ippTools/src/pzgetimfilesConfig.c

    r7027 r8849  
    33#endif
    44
     5#include <stdio.h>
     6#include <string.h>
     7#include <pslib.h>
    58#include <pmConfig.h>
    69
  • trunk/ippTools/src/pztool.c

    r8536 r8849  
    33#endif
    44
     5#include <stdio.h>
     6#include <string.h>
    57#include <stdlib.h>
    68
     
    5961    psArray *summit = summitExpSelectRowObjects(config->dbh,
    6062        config->where, MAX_ROWS);
    61     if (!summit) { 
     63    if (!summit) {
    6264        psError(PS_ERR_UNKNOWN, false, "no summitExp rows found"); \
    63         return false; 
    64     } 
     65        return false;
     66    }
    6567
    6668    psArray *new = newExpSelectRowObjects(config->dbh,
    6769        config->where, MAX_ROWS);
    68     if (!new) { 
     70    if (!new) {
    6971        psError(PS_ERR_UNKNOWN, false, "no newExp rows found"); \
    70     } 
     72    }
    7173
    7274    if (new) {
     
    138140
    139141        if (!newImfileInsert(
    140             config->dbh, 
     142            config->dbh,
    141143            pendingImfile->exp_id,
    142144            pendingImfile->class,
     
    147149            psError(PS_ERR_UNKNOWN, false, "dbh access failed");
    148150            psFree(pending);
    149             goto ROLLBACK; 
     151            goto ROLLBACK;
    150152        }
    151153    }
     
    154156        psError(PS_ERR_UNKNOWN, false, "dbh access failed");
    155157        psFree(pending);
    156         goto ROLLBACK; 
     158        goto ROLLBACK;
    157159    }
    158160    psFree(pending);
     
    161163    if (!pztoolFlushPendingExp(config)) {
    162164        psError(PS_ERR_UNKNOWN, false, "pztoolFlushPendingExp() failed");
    163         goto ROLLBACK; 
    164     }
    165 
    166     // point of no return 
     165        goto ROLLBACK;
     166    }
     167
     168    // point of no return
    167169    if (!psDBCommit(config->dbh)) {
    168170        psError(PS_ERR_UNKNOWN, false, "database error");
    169171        // XXX is this the right thing to do after a commit failure?
    170         goto ROLLBACK; 
     172        goto ROLLBACK;
    171173    }
    172174
Note: See TracChangeset for help on using the changeset viewer.