v4 preprocessor: also open included files in binary mode
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1701 ac1d8469-bf42-47a9-8791-bf33cf982152issue#70
parent
f1f39b5fcf
commit
8149bfc2d7
|
@ -35,7 +35,7 @@ MacroDriver::parse(const string &f, ostream &out)
|
|||
{
|
||||
file = f;
|
||||
|
||||
ifstream in(f.c_str(),ifstream::binary);
|
||||
ifstream in(f.c_str(), ios::binary);
|
||||
|
||||
lexer = new MacroFlex(&in, &out);
|
||||
lexer->set_debug(trace_scanning);
|
||||
|
|
|
@ -67,7 +67,7 @@ typedef Macro::parser::token token;
|
|||
<INITIAL>^@include[ \t]+\" BEGIN(INCLUDE);
|
||||
|
||||
<INCLUDE>[^\"\r\n]* {
|
||||
driver.ifs = new ifstream(yytext);
|
||||
driver.ifs = new ifstream(yytext, ios::binary);
|
||||
if (driver.ifs->fail())
|
||||
driver.error(*yylloc, "Could not open " + string(yytext));
|
||||
// Save old location
|
||||
|
|
Loading…
Reference in New Issue