Commit 435a4df6 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

use correct openmode

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libdatrwxx.su
SVN Revision: 3463
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 7661e7b5
......@@ -33,11 +33,12 @@
* - 31/01/2007 V1.0 Thomas Forbriger
* - 31/10/2007 V1.1 added single precision versions
* PGPLOT requires single precision data
* - 25/11/2010 V1.2 use correct open mode upon opening an ifstream
*
* ============================================================================
*/
#define TF_READTSDATA_CC_VERSION \
"TF_READTSDATA_CC V1.1"
"TF_READTSDATA_CC V1.2"
#define TF_READTSDATA_CC_CVSID \
"$Id$"
......@@ -78,12 +79,15 @@ namespace tfxx {
{
std::cout << "open input file " << filename << std::endl;
}
std::ifstream ifs(filename.c_str());
std::ifstream ifs(filename.c_str(),
datrw::ianystream::openmode(format));
datrw::ianystream is(ifs, format);
retval.data.read(is.idatstream(), selection, verbose);
return(retval);
}
/*----------------------------------------------------------------------*/
//! read complete SFF file with trace selection
DFile readDSFF(const std::string& filename,
const Ttracelist& selection,
......@@ -96,7 +100,8 @@ namespace tfxx {
{
std::cout << "open input file " << filename << std::endl;
}
std::ifstream ifs(filename.c_str());
std::ifstream ifs(filename.c_str(),
datrw::ianystream::openmode(format));
datrw::ianystream is(ifs, format);
retval.data.read(is.idatstream(), selection, verbose);
return(retval);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment