Index: trunk/ippTools/src/.cvsignore
===================================================================
--- trunk/ippTools/src/.cvsignore	(revision 8733)
+++ trunk/ippTools/src/.cvsignore	(revision 8849)
@@ -10,10 +10,10 @@
 *.lo
 p0tool
-p1search
-p2search
+p1tool
+p2tool
 pxadmin
 pzgetexp
 pzgetimfiles
-pzsearch
+pztool
 dettool
 pxinject
Index: trunk/ippTools/src/chiptool.c
===================================================================
--- trunk/ippTools/src/chiptool.c	(revision 8733)
+++ trunk/ippTools/src/chiptool.c	(revision 8849)
@@ -3,4 +3,6 @@
 #endif
 
+#include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
 
@@ -81,5 +83,5 @@
     }
     psArray *pendingFrames = p2PendingFrameSearch(config);
-    // XXX compare raw frames to pending frames and remove duplicate 
+    // XXX compare raw frames to pending frames and remove duplicate
     // frames from the raw set.  This may not be quiet right as it's
     // possible (likely?) that a rawScienceExp is inserted into the
@@ -97,5 +99,5 @@
                     i--;
                     break;
-                } 
+                }
             }
         }
@@ -116,5 +118,5 @@
                         i--;
                         break;
-                    } 
+                    }
                 }
             }
@@ -181,9 +183,9 @@
     // the p2ProcessedeImfile tables
     // remove corresponding entries from the
-    // p2PendingImfile table 
+    // p2PendingImfile table
     // check to see if any p2PendingExps have no
-    // associated p2PendingImfiles 
+    // associated p2PendingImfiles
     // if so move the p2PendingExp(s) to p2ProcessedExp
-    
+
     psString query = psStringCopy(
         "SELECT DISTINCT"
@@ -198,5 +200,5 @@
     {
         psMetadata *where = psMetadataAlloc();
-        bool status = false;        
+        bool status = false;
         psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");        if (!status) {
             psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id");
@@ -319,5 +321,5 @@
     }
 
-    // point of no return for p2PendingImfile -> p2ProcessedImfile 
+    // point of no return for p2PendingImfile -> p2ProcessedImfile
     // point of no return for p2PendingExp -> p2ProcessedExp
     if (!psDBCommit(config->dbh)) {
@@ -333,9 +335,9 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    // look for completed p2PendingExp 
+    // look for completed p2PendingExp
     // migrate them to p2ProccessedExp & p3PendingExp
 
     // select * from p2PendingExp
-    // where exp_id is not in p2ProcessedExp 
+    // where exp_id is not in p2ProcessedExp
     // where exp_id is not in p2PendingImfile
     // where the number of entries in p2ProccessedImfile matches the .imfiles
Index: trunk/ippTools/src/dettool.c
===================================================================
--- trunk/ippTools/src/dettool.c	(revision 8733)
+++ trunk/ippTools/src/dettool.c	(revision 8849)
@@ -3,4 +3,6 @@
 #endif
 
+#include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
 #include <ippdb.h>
Index: trunk/ippTools/src/pxtables.c
===================================================================
--- trunk/ippTools/src/pxtables.c	(revision 8733)
+++ trunk/ippTools/src/pxtables.c	(revision 8849)
@@ -3,4 +3,7 @@
 #endif
 
+#include <stdio.h>
+#include <string.h>
+#include <pslib.h>
 #include "pxtools.h"
 
Index: trunk/ippTools/src/pzgetexp.c
===================================================================
--- trunk/ippTools/src/pzgetexp.c	(revision 8733)
+++ trunk/ippTools/src/pzgetexp.c	(revision 8849)
@@ -3,6 +3,7 @@
 #endif
 
+#include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
-#include <stdio.h>
 
 #include "pxtools.h"
@@ -23,5 +24,5 @@
     // a metadatadb function to retrun the last entry without removing it from
     // the database
-    psArray *summitExps = summitExpSelectRowObjects(config->dbh, NULL, 0); 
+    psArray *summitExps = summitExpSelectRowObjects(config->dbh, NULL, 0);
     if (summitExps) {
         haveLastFileSet = true;
@@ -31,5 +32,5 @@
 
     // invoke dsproductls
-    // dsproductls --uri <> --last_fileset <>  
+    // dsproductls --uri <> --last_fileset <>
     bool status = false;
     psString uri = psMetadataLookupStr(&status, config->args, "-uri");
@@ -138,5 +139,5 @@
         char *uri       = psListGetAndIncrement(tokenCursor);
         char *exp_id    = psListGetAndIncrement(tokenCursor); // fileset
-        char *time      = psListGetAndIncrement(tokenCursor); // datetime 
+        char *time      = psListGetAndIncrement(tokenCursor); // datetime
         char *exp_type  = psListGetAndIncrement(tokenCursor); // type
 
@@ -162,5 +163,5 @@
         psArrayAdd(summitExps, 0, row);
     }
-    
+
     psFree(lineCursor);
     psFree(doc);
Index: trunk/ippTools/src/pzgetexpConfig.c
===================================================================
--- trunk/ippTools/src/pzgetexpConfig.c	(revision 8733)
+++ trunk/ippTools/src/pzgetexpConfig.c	(revision 8849)
@@ -3,4 +3,7 @@
 #endif
 
+#include <stdio.h>
+#include <string.h>
+#include <pslib.h>
 #include <pmConfig.h>
 
Index: trunk/ippTools/src/pzgetimfiles.c
===================================================================
--- trunk/ippTools/src/pzgetimfiles.c	(revision 8733)
+++ trunk/ippTools/src/pzgetimfiles.c	(revision 8849)
@@ -3,6 +3,7 @@
 #endif
 
+#include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
-#include <stdio.h>
 
 #include "pxtools.h"
@@ -47,5 +48,5 @@
     if (!newImfiles) {
         // XXX not nessicarily an error
-        psError(PS_ERR_UNKNOWN, true, "no new files/imfiles"); 
+        psError(PS_ERR_UNKNOWN, true, "no new files/imfiles");
         goto FAIL;
     }
@@ -110,10 +111,10 @@
                 "failed to find summitExp with exp_id %s (should not happen)"
                 , exp_id);
-            goto FAIL; 
+            goto FAIL;
         }
     }
 
     // insert a new pzPendingExp
-    summitExpRow *summitExp = summitExps->data[0]; 
+    summitExpRow *summitExp = summitExps->data[0];
     pzPendingExpRow *pzPendingExp = pzPendingExpRowAlloc(
         summitExp->exp_id,
@@ -121,5 +122,5 @@
         summitExp->telescope,
         summitExp->exp_type,
-        nImfiles 
+        nImfiles
     );
     psFree(summitExps);
Index: trunk/ippTools/src/pzgetimfilesConfig.c
===================================================================
--- trunk/ippTools/src/pzgetimfilesConfig.c	(revision 8733)
+++ trunk/ippTools/src/pzgetimfilesConfig.c	(revision 8849)
@@ -3,4 +3,7 @@
 #endif
 
+#include <stdio.h>
+#include <string.h>
+#include <pslib.h>
 #include <pmConfig.h>
 
Index: trunk/ippTools/src/pztool.c
===================================================================
--- trunk/ippTools/src/pztool.c	(revision 8733)
+++ trunk/ippTools/src/pztool.c	(revision 8849)
@@ -3,4 +3,6 @@
 #endif
 
+#include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
 
@@ -59,14 +61,14 @@
     psArray *summit = summitExpSelectRowObjects(config->dbh,
         config->where, MAX_ROWS);
-    if (!summit) { 
+    if (!summit) {
         psError(PS_ERR_UNKNOWN, false, "no summitExp rows found"); \
-        return false; 
-    } 
+        return false;
+    }
 
     psArray *new = newExpSelectRowObjects(config->dbh,
         config->where, MAX_ROWS);
-    if (!new) { 
+    if (!new) {
         psError(PS_ERR_UNKNOWN, false, "no newExp rows found"); \
-    } 
+    }
 
     if (new) {
@@ -138,5 +140,5 @@
 
         if (!newImfileInsert(
-            config->dbh, 
+            config->dbh,
             pendingImfile->exp_id,
             pendingImfile->class,
@@ -147,5 +149,5 @@
             psError(PS_ERR_UNKNOWN, false, "dbh access failed");
             psFree(pending);
-            goto ROLLBACK; 
+            goto ROLLBACK;
         }
     }
@@ -154,5 +156,5 @@
         psError(PS_ERR_UNKNOWN, false, "dbh access failed");
         psFree(pending);
-        goto ROLLBACK; 
+        goto ROLLBACK;
     }
     psFree(pending);
@@ -161,12 +163,12 @@
     if (!pztoolFlushPendingExp(config)) {
         psError(PS_ERR_UNKNOWN, false, "pztoolFlushPendingExp() failed");
-        goto ROLLBACK; 
-    }
-
-    // point of no return 
+        goto ROLLBACK;
+    }
+
+    // point of no return
     if (!psDBCommit(config->dbh)) {
         psError(PS_ERR_UNKNOWN, false, "database error");
         // XXX is this the right thing to do after a commit failure?
-        goto ROLLBACK; 
+        goto ROLLBACK;
     }
 
