IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8045


Ignore:
Timestamp:
Aug 1, 2006, 3:51:26 PM (20 years ago)
Author:
jhoblitt
Message:

move p2pendingToDoneImfile() into p2search.c

Location:
trunk/ippTools/src
Files:
3 edited

Legend:

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

    r8038 r8045  
    156156static bool doneMode(pxConfig *config)
    157157{
    158     // get exp_id/class/class_id/uri from the CLI // add the completed imfile to
    159     // the p2DoneImfile tables // remove corresponding entries from the
    160     // p2PendingImfile table // check to see if any p2PendingExps have no
    161     // associated p2PendingImfiles //    if so move the p2PendingExp(s) to
    162     // p2DoneExp
     158    // get exp_id/class/class_id/uri from the CLI
     159    // add the completed imfile to
     160    // the p2DoneImfile tables
     161    // remove corresponding entries from the
     162    // p2PendingImfile table
     163    // check to see if any p2PendingExps have no
     164    // associated p2PendingImfiles
     165    // if so move the p2PendingExp(s) to p2DoneExp
    163166
    164167    // find pending
     
    239242    return true;
    240243}
     244
     245// XXX the filename layout is defined by this code
     246psArray *p2pendingToDoneImfile(psArray *pendingImfiles)
     247{
     248    PS_ASSERT_PTR_NON_NULL(pendingImfiles, NULL);
     249
     250    psArray *doneImfiles = psArrayAlloc(pendingImfiles->n);
     251    doneImfiles->n = 0;
     252
     253    for (int i = 0; i < pendingImfiles->n; i++) {
     254        p2PendingImfileRow *pendingImfile = pendingImfiles->data[i];
     255
     256        p2DoneImfileRow *doneImfile = p2DoneImfileRowAlloc(
     257            pendingImfile->exp_id,
     258            pendingImfile->class_id,
     259            pendingImfile->uri,
     260            "my recipe", // recipe
     261            "my stats", // stats
     262            pendingImfile->p1_version,
     263            pendingImfile->p2_version
     264        );
     265
     266        psArrayAdd(doneImfiles, 100, doneImfile);
     267    }
     268
     269    return doneImfiles;
     270}
  • trunk/ippTools/src/p2pendingToDone.c

    r6978 r8045  
    6464}
    6565
    66 // XXX the filename layout is defined by this code
    67 psArray *p2pendingToDoneImfile(psArray *pendingImfiles)
    68 {
    69     PS_ASSERT_PTR_NON_NULL(pendingImfiles, NULL);
    70 
    71     psArray *doneImfiles = psArrayAlloc(pendingImfiles->n);
    72     doneImfiles->n = 0;
    73 
    74     for (int i = 0; i < pendingImfiles->n; i++) {
    75         p2PendingImfileRow *pendingImfile = pendingImfiles->data[i];
    76 
    77         p2DoneImfileRow *doneImfile = p2DoneImfileRowAlloc(
    78             pendingImfile->exp_id,
    79             pendingImfile->class_id,
    80             pendingImfile->uri,
    81             "my recipe", // recipe
    82             "my stats", // stats
    83             pendingImfile->p1_version,
    84             pendingImfile->p2_version
    85         );
    86 
    87         psArrayAdd(doneImfiles, 100, doneImfile);
    88     }
    89 
    90     return doneImfiles;
    91 }
    92 
    9366p2DoneExpRow *p2pendingToDoneExp(p2PendingExpRow *pendingExp)
    9467{
  • trunk/ippTools/src/pxtools.h

    r7650 r8045  
    124124psArray *p2searchDoneFrames(pxConfig *config);
    125125psArray *p2searchPendingImfiles(pxConfig *config);
    126 psArray *p2pendingToDoneImfile(psArray *pendingImfiles);
    127126psArray *p2searchPendingExp(pxConfig *config);
    128127p2DoneExpRow *p2pendingToDoneExp(p2PendingExpRow *pendingExp);
Note: See TracChangeset for help on using the changeset viewer.