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

write header data only if supported by output format

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/trunk
SVN Revision: 4481
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent a06896a4
......@@ -33,11 +33,12 @@
* - 21.12.2010 V1.2 implement output file type option
* - 27.07.2011 V1.3 implement apply trace modifier
* - 08.09.2011 V1.4 support format modifiers
* - 26.01.2012 V1.5 write header data only if supported by output format
*
* ============================================================================
*/
#define TIDOFI_VERSION \
"TIDOFI V1.4 time domain filter"
"TIDOFI V1.5 time domain filter"
#define TIDOFI_CVSID \
"$Id$"
......@@ -413,12 +414,12 @@ int main(int iargc, char* argv[])
filefree.append("block read from first input file:");
filefree.append(infilefree);
}
os << filefree;
if (os.handlesfilefree()) { os << filefree; }
if (is.hassrce())
{
sff::SRCE insrceline;
is >> insrceline;
os << insrceline;
if (os.handlessrce()) { os << insrceline; }
}
}
......@@ -485,7 +486,12 @@ int main(int iargc, char* argv[])
os << wid2;
TFXX_debug(opt.debug, "main",
" series and WID are written");
if (is.hasinfo()) { sff::INFO info; is >> info; os << info; }
if (is.hasinfo())
{
sff::INFO info;
is >> info;
if (os.handlesinfo()) { os << info; }
}
if (is.hasfree() || true)
{
sff::FREE tracefree;
......@@ -500,7 +506,7 @@ int main(int iargc, char* argv[])
{
tracefree.append("passed unchanged");
}
os << tracefree;
if (os.handlestracefree()) { os << tracefree; }
}
TFXX_debug(opt.debug, "main",
"trace #" << itrace << " successfully processed");
......
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