Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 6166)
+++ trunk/MagicSoft/Mars/Changelog	(revision 6167)
@@ -20,4 +20,12 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2005/02/01 Thomas Bretz
+
+   * showplot.cc:
+     - another fix to make the batch mode working (you can use the batch
+       mode to convert a root-file into another format)
+
+
 
  2005/01/31 Thomas Bretz
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 6166)
+++ trunk/MagicSoft/Mars/NEWS	(revision 6167)
@@ -56,4 +56,9 @@
       roughly 0.5%
 
+    - fixed showplot to make file format conversion (eg. converting a
+      status display stored in a root file into a postscript file) in
+      batch mode possible:
+      showplot -b --save-as-ps[=outfile.ps] infile.root
+
 
 
Index: trunk/MagicSoft/Mars/showplot.cc
===================================================================
--- trunk/MagicSoft/Mars/showplot.cc	(revision 6166)
+++ trunk/MagicSoft/Mars/showplot.cc	(revision 6167)
@@ -56,5 +56,5 @@
     // Evaluate arguments
     //
-    MArgs arg(argc, argv);
+    MArgs arg(argc, argv, kTRUE);
 
     if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help"))
@@ -71,7 +71,7 @@
     const Int_t  kTab       = arg.GetIntAndRemove("--tab=", -1);
 
-    const Bool_t kSaveAsPs  = arg.HasOnlyAndRemove("--save-as-ps") || arg.Has("--save-as-ps=");
+    const Bool_t kSaveAsPs  = arg.HasOnlyAndRemove("--save-as-ps")  || arg.Has("--save-as-ps=");
     const Bool_t kSaveAsGif = arg.HasOnlyAndRemove("--save-as-gif") || arg.Has("--save-as-gif=");
-    const Bool_t kSaveAsC   = arg.HasOnlyAndRemove("--save-as-C") || arg.Has("--save-as-C=");
+    const Bool_t kSaveAsC   = arg.HasOnlyAndRemove("--save-as-C")   || arg.Has("--save-as-C=");
 
     TString kNamePs  = arg.GetStringAndRemove("--save-as-ps=");
@@ -89,6 +89,6 @@
     }
 
-    TApplication app("Callisto", &argc, argv);
-    if (gROOT->IsBatch() || !gClient)
+    TApplication app("Showplot", &argc, argv);
+    if (!gROOT->IsBatch() && !gClient || gROOT->IsBatch() && !kBatch)
     {
         gLog << err << "Bombing... maybe your DISPLAY variable is not set correctly!" << endl;
@@ -101,9 +101,9 @@
     const TString kInput = arg.GetArgumentStr(0);
 
-    if (kNamePs.IsNull() && kSaveAsPs)
+    if (kNamePs.IsNull()  && kSaveAsPs)
         kNamePs = kInput;
     if (kNameGif.IsNull() && kSaveAsGif)
         kNameGif = kInput;
-    if (kNameC.IsNull() && kSaveAsC)
+    if (kNameC.IsNull()   && kSaveAsC)
         kNameC = kInput;
 
