Index: trunk/ippTools/src/chiptool.c
===================================================================
--- trunk/ippTools/src/chiptool.c	(revision 8038)
+++ trunk/ippTools/src/chiptool.c	(revision 8045)
@@ -156,9 +156,12 @@
 static bool doneMode(pxConfig *config)
 {
-    // get exp_id/class/class_id/uri from the CLI // add the completed imfile to
-    // the p2DoneImfile tables // remove corresponding entries from the
-    // p2PendingImfile table // check to see if any p2PendingExps have no
-    // associated p2PendingImfiles //    if so move the p2PendingExp(s) to
-    // p2DoneExp
+    // get exp_id/class/class_id/uri from the CLI
+    // add the completed imfile to
+    // the p2DoneImfile tables
+    // remove corresponding entries from the
+    // p2PendingImfile table 
+    // check to see if any p2PendingExps have no
+    // associated p2PendingImfiles 
+    // if so move the p2PendingExp(s) to p2DoneExp
 
     // find pending
@@ -239,2 +242,29 @@
     return true;
 }
+
+// XXX the filename layout is defined by this code
+psArray *p2pendingToDoneImfile(psArray *pendingImfiles)
+{
+    PS_ASSERT_PTR_NON_NULL(pendingImfiles, NULL);
+
+    psArray *doneImfiles = psArrayAlloc(pendingImfiles->n);
+    doneImfiles->n = 0;
+
+    for (int i = 0; i < pendingImfiles->n; i++) {
+        p2PendingImfileRow *pendingImfile = pendingImfiles->data[i];
+
+        p2DoneImfileRow *doneImfile = p2DoneImfileRowAlloc(
+            pendingImfile->exp_id,
+            pendingImfile->class_id,
+            pendingImfile->uri,
+            "my recipe", // recipe
+            "my stats", // stats
+            pendingImfile->p1_version,
+            pendingImfile->p2_version
+        );
+
+        psArrayAdd(doneImfiles, 100, doneImfile);
+    }
+
+    return doneImfiles;
+}
