Index: trunk/MagicSoft/Cosy/Changelog
===================================================================
--- trunk/MagicSoft/Cosy/Changelog	(revision 8984)
+++ trunk/MagicSoft/Cosy/Changelog	(revision 8998)
@@ -1,3 +1,11 @@
                                                                   -*-*- END -*-*-
+
+ 2008/07/13 Thomas Bretz
+
+   * caos/Led.cc, caos/Ring.cc, gui/MGCosy.cc, tcpip/MCeCoCom.cc,
+     tcpip/MDriveCom.cc:
+     - replaced usage of MString::Print by MString::Format
+
+
 
  2008/06/19 Thomas Bretz
Index: trunk/MagicSoft/Cosy/caos/Led.cc
===================================================================
--- trunk/MagicSoft/Cosy/caos/Led.cc	(revision 8984)
+++ trunk/MagicSoft/Cosy/caos/Led.cc	(revision 8998)
@@ -20,9 +20,8 @@
 void Led::Print(Option_t *o) const
 {
-    MString str;
     cout << "Led: ";
-    cout << "x="   << str.Print("%5.1f", fX)   << "+-" << fDx   << ", ";
-    cout << "y="   << str.Print("%5.1f", fY)   << "+-" << fDy   << ", ";
-    cout << "phi=" << str.Print("%6.1f", fPhi) << "+-" << fDphi << ", ";
+    cout << "x="   << MString::Format("%5.1f", fX)   << "+-" << fDx   << ", ";
+    cout << "y="   << MString::Format("%5.1f", fY)   << "+-" << fDy   << ", ";
+    cout << "phi=" << MString::Format("%6.1f", fPhi) << "+-" << fDphi << ", ";
     cout << "mag=" << fMag << endl;
 }
Index: trunk/MagicSoft/Cosy/caos/Ring.cc
===================================================================
--- trunk/MagicSoft/Cosy/caos/Ring.cc	(revision 8984)
+++ trunk/MagicSoft/Cosy/caos/Ring.cc	(revision 8998)
@@ -138,9 +138,8 @@
 void Ring::Print(Option_t *o) const
 {
-    MString str;
     cout << "Ring: ";
-    cout << "x="   << str.Print("%5.1f", fX) << "+-" << Form("%.1f", fDx) << ", ";
-    cout << "y="   << str.Print("%5.1f", fY) << "+-" << Form("%.1f", fDy) << ", ";
-    cout << "r="   << str.Print("%5.1f", fR) << "+-" << Form("%.1f", fDr) << ", ";
+    cout << "x="   << MString::Format("%5.1f", fX) << "+-" << MString::Format("%.1f", fDx) << ", ";
+    cout << "y="   << MString::Format("%5.1f", fY) << "+-" << MString::Format("%.1f", fDy) << ", ";
+    cout << "r="   << MString::Format("%5.1f", fR) << "+-" << MString::Format("%.1f", fDr) << ", ";
     cout << "phi=" << fPhi              << "+-" << fDphi << endl;
 }
Index: trunk/MagicSoft/Cosy/gui/MGCosy.cc
===================================================================
--- trunk/MagicSoft/Cosy/gui/MGCosy.cc	(revision 8984)
+++ trunk/MagicSoft/Cosy/gui/MGCosy.cc	(revision 8998)
@@ -1031,7 +1031,5 @@
     if (oldmjd != (ULong_t)(1000000*mjd))
     {
-        MString str;
-        str.Print("%12.6f", mjd);
-        fMjd->SetText(new TGString(str));
+        fMjd->SetText(new TGString(MString::Format("%12.6f", mjd)));
         oldmjd = (ULong_t)(1000000*mjd);
     }
Index: trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc	(revision 8984)
+++ trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc	(revision 8998)
@@ -132,6 +132,6 @@
     fT.GetTime(h2, m2, s2, ms2);
 
-    MString msg;
-    msg.Print("%s "
+    const TString msg =
+        MString::Format("%s "
              "%02d %04d %02d %02d %02d %02d %02d %03d "
              "%02d %04d %02d %02d %02d %02d %02d %03d "
@@ -161,7 +161,6 @@
         return "";
 
-    MString str;
-    return str.Print("Temp: %.1f'C  Hum: %.1f%%  Wind: %.1fkm/h",
-                     fTemperature, fHumidity, fWindSpeed);
+    return MString::Format("Temp: %.1f'C  Hum: %.1f%%  Wind: %.1fkm/h",
+                           fTemperature, fHumidity, fWindSpeed);
 }
 
Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 8984)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 8998)
@@ -238,6 +238,5 @@
     MAstro::Deg2Dms(deg, sgn, d, m, s);
 
-    MString txt;
-    str += txt.Print("%c %03d %02d %03d ", sgn, d, m, s);
+    str += MString::Format("%c %03d %02d %03d ", sgn, d, m, s);
 }
 
@@ -266,17 +265,15 @@
         SetStatus(4);
 
-    MString txt;
-
     TString str;
     Print(str, rd.Ra());    // Ra
     Print(str, rd.Dec());   // Dec
     Print(str, 0);          // HA
-    str += txt.Print("%12.6f ", t.GetMjd()); // mjd
+    str += MString::Format("%12.6f ", t.GetMjd()); // mjd
     Print(str, so.Zd());
     Print(str, so.Az());
     Print(str, is.Zd());
     Print(str, is.Az());
-    str += txt.Print("%08.3f ", er.Zd());
-    str += txt.Print("%08.3f ", er.Az());
+    str += MString::Format("%08.3f ", er.Zd());
+    str += MString::Format("%08.3f ", er.Az());
     str += armed ? "1 " : "0 ";
 
@@ -305,19 +302,17 @@
         SetStatus(4);
     
-    MString txt;
-
     TString str;
-    str += txt.Print("%05.3f ", miss.Zd());       //[arcmin]
-    str += txt.Print("%05.3f ", miss.Az());       //[arcmin]
+    str += MString::Format("%05.3f ", miss.Zd());       //[arcmin]
+    str += MString::Format("%05.3f ", miss.Az());       //[arcmin]
     Print(str, nompos.Zd());                      //[deg]
     Print(str, nompos.Az());                      //[deg]
-    str += txt.Print("%05.1f ",   center.GetX()); //number
-    str += txt.Print("%05.1f ",   center.GetY()); //number
-    str += txt.Print("%04d ",   n);               //number of correleated stars
-    str += txt.Print("%03.1f ",  bright);
-    str += txt.Print("%12.6f ", t.GetMjd());      // mjd
-    str += txt.Print("%.1f ", x);
-    str += txt.Print("%.1f ", y);
-    str += txt.Print("%04d ", num);               //number of detected stars
+    str += MString::Format("%05.1f ",   center.GetX()); //number
+    str += MString::Format("%05.1f ",   center.GetY()); //number
+    str += MString::Format("%04d ",   n);               //number of correleated stars
+    str += MString::Format("%03.1f ",  bright);
+    str += MString::Format("%12.6f ", t.GetMjd());      // mjd
+    str += MString::Format("%.1f ", x);
+    str += MString::Format("%.1f ", y);
+    str += MString::Format("%04d ", num);               //number of detected stars
 
     return SendRep("STARG-REPORT", str, kTRUE);
