Index: trunk/Mars/mcore/ofits.h
===================================================================
--- trunk/Mars/mcore/ofits.h	(revision 14865)
+++ trunk/Mars/mcore/ofits.h	(revision 14867)
@@ -254,4 +254,6 @@
         if (!entry.check())
         {//ETIENNE
+            if (!fCommentTrimming)
+                return false;
             //looks like something went wrong. Maybe entry is too long ?
             //try to remove the comment
@@ -306,9 +308,12 @@
     Checksum fHeaderSum;
 
+    bool fCommentTrimming;
+
 public:
-    ofits()
-    {
-    }
-    ofits(const char *fname) : ofstream()
+    ofits() : fCommentTrimming(false)
+    {
+    }
+    ofits(const char *fname) : ofstream(),
+                               fCommentTrimming(false)
     {
         this->open(fname);
@@ -337,4 +342,9 @@
 
         ofstream::open(filename);
+    }
+
+    void AllowCommentsTrimming(bool allow)
+    {
+        fCommentTrimming = allow;
     }
 
