fixes compile error on linux;

changes made for TestIPhreeqc::case2 

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/branches/multi_punch@7923 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2013-08-13 21:26:16 +00:00
parent 6eaca680af
commit 9faaee66d4

View File

@ -5034,20 +5034,28 @@ read_selected_output(void)
// store new selected output
SelectedOutput_map[n_user] = temp_selected_output;
if (punch_open(SelectedOutput_map[n_user].Get_file_name().c_str(), n_user))
//{{
if (!SelectedOutput_map[n_user].Get_have_punch_name())
{
if (this->phrq_io)
assert(SelectedOutput_map[n_user].Get_punch_ostream() == 0);
//}}
if (punch_open(SelectedOutput_map[n_user].Get_file_name().c_str(), n_user))
{
SelectedOutput_map[n_user].Set_punch_ostream(this->phrq_io->Get_punch_ostream());
this->phrq_io->Set_punch_ostream(NULL);
if (this->phrq_io)
{
SelectedOutput_map[n_user].Set_punch_ostream(this->phrq_io->Get_punch_ostream());
this->phrq_io->Set_punch_ostream(NULL);
}
}
else
{
error_string = sformatf( "Can`t open file, %s.", SelectedOutput_map[n_user].Get_file_name().c_str());
input_error++;
error_msg(error_string, CONTINUE);
}
//{{
}
else
{
error_string = sformatf( "Can`t open file, %s.", SelectedOutput_map[n_user].Get_file_name().c_str());
input_error++;
error_msg(error_string, CONTINUE);
}
//}}
}
//if (!have_punch_name)