Index: trunk/ippTools/src/dettool_residimfile.c
===================================================================
--- trunk/ippTools/src/dettool_residimfile.c	(revision 23229)
+++ trunk/ippTools/src/dettool_residimfile.c	(revision 23688)
@@ -75,5 +75,5 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    
+
     PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false); // required
     PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", false, false);
@@ -84,7 +84,7 @@
     PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", true, false); // required
     PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); // required
-    PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
-    PXOPT_LOOKUP_STR(uri, config->args, "-uri", (code == 0), false); // Required if code == 0
-    PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (code == 0), false); // Required if code == 0
+    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
+    PXOPT_LOOKUP_STR(uri, config->args, "-uri", (fault == 0), false); // Required if fault == 0
+    PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (fault == 0), false); // Required if fault == 0
     PXOPT_LOOKUP_F64(bg, config->args, "-bg", false, false);
     PXOPT_LOOKUP_F64(bg_stdev, config->args, "-bg_stdev", false, false);
@@ -107,5 +107,5 @@
 
     if (!detResidImfileInsert(
-	    config->dbh,
+            config->dbh,
             det_id,
             iteration,
@@ -134,6 +134,6 @@
             user_5,
             path_base,
-	    "full",
-            code
+            "full",
+            fault
     )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -174,5 +174,5 @@
         psStringAppend(&query, " %s", whereClause);
         psFree(whereClause);
-	hasWhere = true;
+        hasWhere = true;
     }
     psFree(where);
@@ -180,16 +180,16 @@
     // restrict search to included imfiles
     if (included) {
-	if (hasWhere) {
-	    psStringAppend(&query, " AND detInputExp.include = 1");
-	} else {
-	    psStringAppend(&query, " WHERE detInputExp.include = 1");
-	}
-	hasWhere = true;
+        if (hasWhere) {
+            psStringAppend(&query, " AND detInputExp.include = 1");
+        } else {
+            psStringAppend(&query, " WHERE detInputExp.include = 1");
+        }
+        hasWhere = true;
     }
 
     if (hasWhere) {
-	psStringAppend(&query, " AND");
+        psStringAppend(&query, " AND");
     } else {
-	psStringAppend(&query, " WHERE");
+        psStringAppend(&query, " WHERE");
     }
 
@@ -249,5 +249,5 @@
     PXOPT_COPY_S64(config->args, where, "-exp_id",  "exp_id", "==");
     PXOPT_COPY_STR(config->args, where, "-class_id",  "class_id", "==");
-    PXOPT_COPY_S16(config->args, where, "-code",      "fault", "==");
+    PXOPT_COPY_S16(config->args, where, "-fault",      "fault", "==");
 
     psString query = pxDataGet("dettool_revertresidimfile.sql");
@@ -289,5 +289,5 @@
     PXOPT_LOOKUP_STR(data_state, config->args, "-data_state", true, false);
     if (!setResidImfileDataState(config, det_id, iteration, exp_id, class_id, data_state)) {
-	return false;
+        return false;
     }
     return true;
