]> Creatis software - bbtk.git/commitdiff
#3028 BBTK Bug New Normal - rights reading files in std
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 19 Oct 2016 10:02:17 +0000 (12:02 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 19 Oct 2016 10:02:17 +0000 (12:02 +0200)
kernel/appli/bbi/bbiWeb.cxx
packages/std/src/bbstdReadColumnsDouble.cxx
packages/std/src/bbstdReadColumnsInt.cxx
packages/std/src/bbstdReadColumnsString.cxx

index 55ce986f1cb27620bb58d70384b73765cf3b25db..088433a036cd40937e299039074573f97411d7a6 100644 (file)
@@ -58,7 +58,8 @@ printf("bbiWeb: [4]: %s \n",argv[4]);
  
 
   bbtk::Interpreter::Pointer I = bbtk::Interpreter::New();
- printf("bbiWeb...C\n");
+
+printf("bbiWeb...C\n");
 
   std::string fileName = argv[0];
   std::size_t pos      = fileName.find("_");     
index 42815ce3b0a4ce89876ea9288701f6fd61502bd1..ca3dd76be41105337377f09a2f51270f0f0a1959 100644 (file)
@@ -40,7 +40,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ReadColumnsDouble,bbtk::AtomicBlackBox);
 //===== 
 void ReadColumnsDouble::Process()
 {      
-printf("EED ReadColumnsDouble::Process  UPS  \n");
        std::vector< std::vector<double> * > tlst;      
        int i;
        for( i=0 ;  i<bbGetInputDimension() ; i++)
@@ -50,7 +49,7 @@ printf("EED ReadColumnsDouble::Process  UPS  \n");
        int numberOfLines = 0;
        char tmpValue[1000];
        std::vector<double> *vecData;
-       FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r+" );
+       FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r" );
        if (ff1!=NULL)
        {
                 if (!feof(ff1))
index e860d23383c3a667c8d75637646d3c2db8431e43..5a0c08a9fc9226431a55c08fee049c2afae95b9c 100644 (file)
@@ -49,7 +49,7 @@ void ReadColumnsInt::Process()
        int numberOfLines = 0;
        char tmpValue[1000];
        std::vector<int> *vecData;
-       FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r+" );
+       FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r" );
        if (ff1!=NULL)
        {
                 if (!feof(ff1))
index d56e658466dcb0c4a4baba44afb940077245af17..2860219d384957e978256e26e9ff3744bc0c10a8 100644 (file)
@@ -54,13 +54,13 @@ void ReadColumnsString::Process()
        int numberOfLines = 0;
        char tmpValue[500];
        std::vector<std::string> *vecData;
-       FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r+" );
+       FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r" );
        if (ff1!=NULL)
        {
                for (iSkipLines=0;iSkipLines<bbGetInputSkipLines(); iSkipLines++ )
-      {
-         fgets( tmpValue , 500, ff1 ); 
-      }
+       {
+               fgets( tmpValue , 500, ff1 ); 
+       }
 
                while (!feof(ff1))
                {