]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkComplexBlackBox.cxx
BUG MACOS
[bbtk.git] / kernel / src / bbtkComplexBlackBox.cxx
index 47b983717e5b27d0b34b0c68470ca041fb499862..f3531fc5b301539336b3539d80f6c324767b1eec 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 12:11:21 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2009/03/30 15:22:51 $
+  Version:   $Revision: 1.25 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -680,7 +680,6 @@ namespace bbtk
                                            const std::string& output_dir,
                                            bool relative_link )
   {
-    
     std::string directory(output_dir);
 
     if (output_dir.length() == 0) 
@@ -702,10 +701,10 @@ namespace bbtk
     std::string filename_dot2  ("\""   + filename_dot  + "\"");
     
 
-    std::string command1 ("dot -T png -o "  
-                         + filename_png2  + " " + filename_dot2);
+    std::string command1 ("dot -Tpng:quartz -o "  
+                         + filename_png2  + " " + filename_dot2 );
     std::string command1a("dot -T cmap -o " 
-                         + filename_cmap2 + " " + filename_dot2);
+                         + filename_cmap2 + " " + filename_dot2 );
 
     // 1. Generating .dot file
     FILE *ff;
@@ -739,14 +738,16 @@ namespace bbtk
     FILE *ff2;
     char c;
     ff2=fopen(filename_cmap.c_str(),"r");
-    while (!feof(ff2))
-    {
-          c=fgetc(ff2);
-          if (c!=-1)
-          {
-             (s) << c;
-          }
-    }
+       if (ff2!=NULL){
+               while (!feof(ff2))
+               {
+                       c=fgetc(ff2);
+                       if (c!=-1)
+                       {
+                               (s) << c;
+                       } // if 
+               } // while
+       } // if ff2
     (s) << "</map>\n\n";
     
     // End