Index: trunk/ippTools/src/p2insertPendingFrames.c
===================================================================
--- trunk/ippTools/src/p2insertPendingFrames.c	(revision 6083)
+++ trunk/ippTools/src/p2insertPendingFrames.c	(revision 6086)
@@ -24,4 +24,6 @@
 	p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc(
         rawFrame->exposure->exp_id,
+        rawFrame->exposure->camera,
+        rawFrame->exposure->filter,
         rawFrame->exposure->class,
         rawFrame->exposure->nclass,
@@ -38,4 +40,5 @@
 	    p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
 	        rawImage->exp_id,
+	        rawImage->exptype,
 	        rawImage->class,
 	        rawImage->class_id,
Index: trunk/ippTools/src/p2pendingToDone.c
===================================================================
--- trunk/ippTools/src/p2pendingToDone.c	(revision 6083)
+++ trunk/ippTools/src/p2pendingToDone.c	(revision 6086)
@@ -2,5 +2,5 @@
 
 // select pending frames (exposure+images) which are done/not done
-psArray *p2pendingToDone (p2Config *config, psArray *pendingFrames) {
+psArray *p2pendingToDone(p2Config *config, psArray *pendingFrames) {
 
     psArray *doneFrames = psArrayAlloc(pendingFrames->n);
@@ -9,48 +9,52 @@
     for (int i = 0; i < pendingFrames->n; i++) {
         p2PendingFrame *pendingFrame = pendingFrames->data[i];
-//	if (pendingFrame->exposure->state != P2_STATE_DONE) continue;
+// if (pendingFrame->exposure->state != P2_STATE_DONE) continue;
 
-	p2DoneExpRow *doneExposure = p2DoneExpRowAlloc(
-	    pendingFrame->exposure->exp_id,
-	    pendingFrame->exposure->class,
-	    pendingFrame->exposure->nclass,
-	    pendingFrame->exposure->nclass, // XXX ndone is uneeded?
-	    pendingFrame->exposure->p1_version,
-	    pendingFrame->exposure->p2_version
-	//doneExposure->state = P2_STATE_DONE;
-    );
+        p2DoneExpRow *doneExposure = p2DoneExpRowAlloc(
+            pendingFrame->exposure->exp_id,
+            pendingFrame->exposure->camera,
+            pendingFrame->exposure->filter,
+            pendingFrame->exposure->class,
+            pendingFrame->exposure->nclass, // XXX ndone is uneeded?
+            0xFF, // ndone
+            pendingFrame->exposure->p1_version,
+            pendingFrame->exposure->p2_version
+            //doneExposure->state = P2_STATE_DONE;
+        );
 
-	psArray *doneImages = psArrayAlloc (pendingFrame->images->n);
-	doneImages->n = 0;
-	for (int j = 0; j < pendingFrame->images->n; j++) {
-	    p2PendingImfileRow *pendingImage = pendingFrame->images->data[j];
+        psArray *doneImages = psArrayAlloc(pendingFrame->images->n);
+        doneImages->n = 0;
+        for (int j = 0; j < pendingFrame->images->n; j++) {
+        p2PendingImfileRow *pendingImage = pendingFrame->images->data[j];
 
         /*
-	    if (pendingImage->state != P2_STATE_DONE) {
-		psAbort ("p2search", "programming error!");
-	    }
+        if (pendingImage->state != P2_STATE_DONE) {
+            psAbort ("p2search", "programming error!");
+        }
         */
 
-	    p2DoneImfileRow *doneImage = p2DoneImfileRowAlloc(
-	        pendingImage->exp_id,
-	        pendingImage->class,
-	        pendingImage->class_id,
-	        pendingImage->p1_version,
-	        pendingImage->p2_version,
+        p2DoneImfileRow *doneImage = p2DoneImfileRowAlloc(
+            pendingImage->exp_id,
+            pendingImage->exptype,
+            pendingImage->class,
+            pendingImage->class_id,
+            pendingImage->p1_version,
+            pendingImage->p2_version,
             "", // recipe
             "", // stats
-	        pendingImage->url
+            pendingImage->url
         );
 
-	    psArrayAdd (doneImages, 100, doneImage);
-	}
-	
-    // XXX FIXME
-	p2DoneFrame *doneFrame = p2DoneFrameAlloc(doneExposure, doneImages);
+        psArrayAdd(doneImages, 100, doneImage);
+}
 
-	psArrayAdd (doneFrames, 100, doneFrame);
+        // XXX FIXME
+        p2DoneFrame *doneFrame = p2DoneFrameAlloc(doneExposure, doneImages);
+
+        psArrayAdd(doneFrames, 100, doneFrame);
     }
+
     return doneFrames;
-} 
+}
 
 // XXX the filename layout is defined by this code
Index: trunk/ippTools/src/p2rawToPending.c
===================================================================
--- trunk/ippTools/src/p2rawToPending.c	(revision 6083)
+++ trunk/ippTools/src/p2rawToPending.c	(revision 6086)
@@ -2,5 +2,5 @@
 
 // select pending frames (exposure+images) which are done/not done
-psArray *p2rawToPending (p2Config *config, psArray *rawFrames) {
+psArray *p2rawToPending(p2Config *config, psArray *rawFrames) {
 
     psArray *pendingFrames = psArrayAlloc(rawFrames->n);
@@ -8,37 +8,42 @@
 
     for (int i = 0; i < rawFrames->n; i++) {
-	ppRawFrame *rawFrame = rawFrames->data[i];
+        ppRawFrame *rawFrame = rawFrames->data[i];
 
-	p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc(
-	    rawFrame->exposure->exp_id,
-	    rawFrame->exposure->class,
-	    rawFrame->exposure->nclass,
-	    0xff,   // p1
-	    0xff    // p2
-    );
-
-	psArray *pendingImages = psArrayAlloc (rawFrame->images->n);
-	pendingImages->n = 0;
-	for (int j = 0; j < rawFrame->images->n; j++) {
-	    rawImfileRow *rawImage = rawFrame->images->data[j];
-	    p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
-	        rawImage->exp_id,
-	        rawImage->class,
-	        rawImage->class_id,
-	        0xff,   // p1
-	        0xff,   // p2
-            "",     // recipe
-            "",     // stats
-	        rawImage->url
+        p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc(
+            rawFrame->exposure->exp_id,
+            rawFrame->exposure->camera,
+            rawFrame->exposure->filter,
+            rawFrame->exposure->class,
+            rawFrame->exposure->nclass,
+            0xff,   // p1
+            0xff    // p2
         );
 
-	    psArrayAdd (pendingImages, 100, pendingImage);
-	}
-	
-	p2PendingFrame *pendingFrame = p2PendingFrameAlloc (pendingExposure, pendingImages);
-	psArrayAdd (pendingFrames, 100, pendingFrame);
+        psArray *pendingImages = psArrayAlloc(rawFrame->images->n);
+        pendingImages->n = 0;
+        for (int j = 0; j < rawFrame->images->n; j++) {
+            rawImfileRow *rawImage = rawFrame->images->data[j];
+            p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
+                rawImage->exp_id,
+                rawImage->exptype,
+                rawImage->class,
+                rawImage->class_id,
+                0xff,   // p1
+                0xff,   // p2
+                "",     // recipe
+                "",     // stats
+                rawImage->url
+            );
+
+            psArrayAdd(pendingImages, 100, pendingImage);
+        }
+
+        p2PendingFrame *pendingFrame = p2PendingFrameAlloc(pendingExposure,
+            pendingImages);
+        psArrayAdd(pendingFrames, 100, pendingFrame);
     }
+
     return pendingFrames;
-} 
+}
 
 // XXX the filename layout is defined by this code
Index: trunk/ippTools/src/p2writePendingFrames.c
===================================================================
--- trunk/ippTools/src/p2writePendingFrames.c	(revision 6083)
+++ trunk/ippTools/src/p2writePendingFrames.c	(revision 6086)
@@ -5,16 +5,16 @@
 
     for (int i = 0; i < frames->n; i++) {
-	p2PendingFrame *frame = frames->data[i];
-	
-	for (int j = 0; j < frame->images->n; j++) {
-	    p2PendingImfileRow *image = frame->images->data[j];
-	    fprintf (stdout, "%s %d %s %s %s\n",
-		     image->exp_id,
-		     image->p2_version,
-		     image->class,
-		     image->class_id,
-		     image->url);
-	}
+        p2PendingFrame *frame = frames->data[i];
+        for (int j = 0; j < frame->images->n; j++) {
+            p2PendingImfileRow *image = frame->images->data[j];
+            fprintf (stdout, "%s %d %s %s %s\n",
+            image->exp_id,
+            image->p2_version,
+            image->class,
+            image->class_id,
+            image->url);
+        }
     }
+
     return true;
 } 
