(file) Return to utility.cpp CVS log (file) (dir) Up to [OMI] / omi / ut

Diff for /omi/ut/utility.cpp between version 1.2 and 1.3

version 1.2, 2015/04/20 18:10:35 version 1.3, 2015/04/20 18:20:37
Line 31 
Line 31 
 # include <sys/types.h> # include <sys/types.h>
 #endif #endif
  
 #ifdef T  #ifdef ZT
 #undef T  #undef ZT
 #endif #endif
  
 using namespace std; using namespace std;
Line 40 
Line 40 
 namespace ut namespace ut
 { {
  
 static FILE* Fopen(const char* path, const char* mode)  static FILE* File_Open(const char* path, const char* mode)
 { {
 #if defined(_MSC_VER) #if defined(_MSC_VER)
     FILE* fp;     FILE* fp;
Line 53 
Line 53 
  
 bool readFileContent( const std::string& file, std::vector< unsigned char >& content ) bool readFileContent( const std::string& file, std::vector< unsigned char >& content )
 { {
     FILE* f = Fopen(file.c_str(), "r");      FILE* f = File_Open(file.c_str(), "r");
     if ( !f )     if ( !f )
         return false;         return false;
  
Line 70 
Line 70 
     if (content.empty())     if (content.empty())
         return false;         return false;
  
     FILE* f = Fopen(file.c_str(), "w");      FILE* f = File_Open(file.c_str(), "w");
     if ( !f )     if ( !f )
         return false;         return false;
  
Line 106 
Line 106 
       return res;       return res;
  
     UT_ASSERT_FAILED_MSG( string(string("file not found: ") + file).c_str() );     UT_ASSERT_FAILED_MSG( string(string("file not found: ") + file).c_str() );
     //return string();      return string();
 } }
  
  


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

ViewCVS 0.9.2