Index: trunk/ippTools/src/warptool.c
===================================================================
--- trunk/ippTools/src/warptool.c	(revision 16253)
+++ trunk/ippTools/src/warptool.c	(revision 16733)
@@ -33,7 +33,5 @@
 
 static psS64 definerunMode(pxConfig *config);
-static bool runoneMode(pxConfig *config);
 static bool updaterunMode(pxConfig *config);
-static bool addinputexpMode(pxConfig *config);
 static bool expMode(pxConfig *config);
 static bool imfileMode(pxConfig *config);
@@ -69,7 +67,5 @@
     switch (config->mode) {
         MODECASE(WARPTOOL_MODE_DEFINERUN,         definerunMode);
-        MODECASE(WARPTOOL_MODE_RUNONE,            runoneMode);
         MODECASE(WARPTOOL_MODE_UPDATERUN,         updaterunMode);
-        MODECASE(WARPTOOL_MODE_ADDINPUTEXP,       addinputexpMode);
         MODECASE(WARPTOOL_MODE_EXP,               expMode);
         MODECASE(WARPTOOL_MODE_IMFILE,            imfileMode);
@@ -108,4 +104,5 @@
 
     // required options
+    PXOPT_LOOKUP_STR(cam_id, config->args, "-cam_id", true, false);
     PXOPT_LOOKUP_STR(mode, config->args, "-mode", true, false);
     // check mode
@@ -122,9 +119,11 @@
 
     // default
+    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
+    PXOPT_LOOKUP_BOOL(magiced, config->args, "-magiced", false);
     PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
-    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
 
     warpRunRow *warpRun = warpRunRowAlloc(
             0,          // ID
+            (psS64)atoll(cam_id),
             mode,
             "reg",      // state
@@ -134,5 +133,6 @@
             tess_id,
             end_stage,
-            registered
+            registered,
+            magiced
     );
     if (!warpRun) {
@@ -161,60 +161,4 @@
 }
 
-static bool runoneMode(pxConfig *config)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-
-    if (!psDBTransaction(config->dbh)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    psS64 warp_id = definerunMode(config);
-    if (!warp_id) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "failed to define warpRun");
-        return false;
-    }
-
-    psString warp_id_str = psDBIntToString(warp_id);
-    if (!psMetadataAddStr(config->args, PS_LIST_TAIL, "-warp_id", 0, NULL, warp_id_str)) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "failed to add item warp_id");
-        psFree(warp_id_str);
-        return false;
-    }
-    psFree(warp_id_str);
-
-    if (!addinputexpMode(config)) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "failed to add cam_id to warpRun");
-        return false;
-    }
-    if (!pxwarpRunSetState(config, warp_id, "run")) {
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        psError(PS_ERR_UNKNOWN, false, "failed to set warpRun.state to run");
-        return false;
-    }
-
-    // point of no return
-    if (!psDBCommit(config->dbh)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    return true;
-}
 
 static bool updaterunMode(pxConfig *config)
@@ -228,27 +172,4 @@
         // set detRun.state to state
         return pxwarpRunSetState(config, (psS64)atoll(warp_id), state);
-    }
-
-    return true;
-}
-
-
-static bool addinputexpMode(pxConfig *config)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-
-    PXOPT_LOOKUP_STR(warp_id, config->args, "-warp_id", true, false);
-    PXOPT_LOOKUP_STR(cam_id, config->args, "-cam_id", true, false);
-
-    // defaults to false
-    PXOPT_LOOKUP_BOOL(magiced, config->args, "-magiced", false);
-
-    if (!warpInputExpInsert(config->dbh,
-            (psS64)atoll(warp_id),
-            (psS64)atoll(cam_id),
-            magiced
-        )) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
     }
 
