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

close file unit if last trace is read

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/su1
SVN Revision: 3654
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent de62720c
......@@ -97,7 +97,7 @@ int sff_rtracei__(integer *lu, real *tanf, real *dt, char *wid2line,
int retval=0;
*ierr=0;
try {
datrw::ianystream &is=istreammanager(int(*lu));
datrw::ianystream &is=istreammanager(static_cast<int>(*lu));
sff::WID2 wid2;
sff::INFO info;
datrw::Tfseries iseries;
......@@ -128,6 +128,7 @@ int sff_rtracei__(integer *lu, real *tanf, real *dt, char *wid2line,
*c2=real(info.cy);
*c3=real(info.cz);
*nstack=info.nstacks;
if (is.last()) { istreammanager.close(static_cast<int>(*lu)); }
}
catch(...) {
*ierr=1;
......
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