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

supports reading trace FREE block

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:
SVN Revision: 3680
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 9ec01c15
......@@ -200,6 +200,9 @@ $(DOXYWWWPATH)/html/index.html: $(DOXYSRC)
mkdir -vp $(DOXYWWWPATH)
doxygen $<
.PHONY: doc
doc: doxydoc
.PHONY: doxydoc
doxydoc: $(DOXYWWWPATH)/html/index.html
doxyview: $(DOXYWWWPATH)/html/index.html
......@@ -95,6 +95,13 @@ c
* \endcode
int sff_rtracefi__(integer *lu, real *tanf, real *dt, char *wid2line,
integer *nsamp, real *fdata, integer *idata, char *code,
logical *last, integer *nline, char *lines,
integer *lindim, integer *lenmax, char *cs, real *c1,
real *c2, real *c3, integer *nstack, integer *ierr,
ftnlen wid2line_len, ftnlen code_len,
ftnlen lines_len, ftnlen cs_len)
int retval=0;
......@@ -105,7 +112,7 @@ c----------------------------------------------------------------------
datrw::Tfseries iseries;
is >> iseries;
FAPIDXX_fuassert((static_cast<int>(iseries.size())<=(*nsamp)), *lu,
"sff_rtracei__: too many samples");
"sff_rtracefi__: too many samples");
int nsamples=iseries.size();
aff::LinearShape shape(0, nsamples-1, 0);
datrw::Tfseries series(shape, aff::SharedHeap<real>(fdata, *nsamp));
......@@ -128,11 +135,32 @@ c----------------------------------------------------------------------
if (is.hasfree())
sff::FREE free;
is >> free;
int ifline=0;
typedef sff::FREE::Tlines Tlines;
Tlines::const_iterator I=free.lines.begin();
char* pfree=lines;
while ((I!=free.lines.end()) && (ifline< *lindim))
int linelen=static_cast<int>(I->length());
*lenmax= *lenmax>linelen ? *lenmax : linelen;
fillfstring(*I, pfree, lines_len);
pfree += lines_len;
catch(...) {
return retval;
} // int sff_rtracei__
} // int sff_rtracefi__
/* ----- END OF ----- */
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