is >> c;
if (is.eof()) return;
}
- if (!(is.fail()) || c != '\n')
+ if (!(is.fail()) && c != '\n')
is.unget();
} ////
//------------------------------------------------------------------
// Open a file for reading
void clitk::openFileForReading(std::ifstream & is, const std::string & filename)
{
- is.open(filename.c_str(), std::ios::in);
+ is.open(filename.c_str(), std::ios::in | std::ios::binary);
if ( is.fail() ) {
clitkExceptionMacro("Could not open file for reading: "
<< filename << ". Error is : <"