Index: trunk/FACT++/src/fitsdump.cc
===================================================================
--- trunk/FACT++/src/fitsdump.cc	(revision 20091)
+++ trunk/FACT++/src/fitsdump.cc	(revision 20092)
@@ -1,2 +1,3 @@
+//****************************************************************
 //****************************************************************
 /** @class FitsDumper
@@ -470,5 +471,5 @@
         {
             cerr << "Could not open root file '" << filename << "'" << endl;
-            return -2;
+            return 8;
         }
     }
@@ -1100,17 +1101,17 @@
 
     if (conf.Get<bool>("header") || conf.Get<bool>("list") || conf.Get<bool>("filecontent"))
+        return 0;
+
+    // ------------------------------------------------------------
+
+    if (conf.Get<bool>("minmax") && conf.Get<bool>("stat"))
+    {
+        cerr << "Invalid combination of options: cannot do stats and minmax." << endl;
         return 1;
-
-    // ------------------------------------------------------------
-
-    if (conf.Get<bool>("minmax") && conf.Get<bool>("stat"))
-    {
-        cerr << "Invalid combination of options: cannot do stats and minmax." << endl;
-        return -1;
     }
     if (conf.Get<bool>("stat") && conf.Get<bool>("nozero"))
     {
         cerr << "Invalid combination of options: nozero only works with minmax." << endl;
-        return -1;
+        return 2;
     }
 
@@ -1118,5 +1119,5 @@
     {
         cerr << "Switched --scientific and --fixed are mutually exclusive." << endl;
-        return -1;
+        return 3;
     }
 
@@ -1124,5 +1125,5 @@
     {
         cerr << "Switched --% and --%% are mutually exclusive." << endl;
-        return -1;
+        return 4;
     }
 
@@ -1148,5 +1149,5 @@
         {
             cerr << "Cannot open output stream " << filename << ": " << strerror(errno) << endl;
-            return false;
+            return 5;
         }
         fout.rdbuf(sout.rdbuf());
@@ -1180,5 +1181,5 @@
         {
             cerr << "Format '" << *it << "' not supported." << endl;
-            return -1;
+            return 6;
         }
     }
@@ -1186,5 +1187,5 @@
     const vector<MyColumn> cols = InitColumns(conf.Vec<string>("col"));
     if (cols.empty())
-        return false;
+        return 7;
 
     if (conf.Get<bool>("minmax"))
