IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

move p2pendingToDoneImfile() into p2search.c

File:
1 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}
Note: See TracChangeset for help on using the changeset viewer.