Fortran SFF API to data I/O streams in C++

◆ freeblock() [2/2]

void fapidxx::freeblock ( const ::sff::FREE &  free,
integer nline,
char *  lines,
integer lindim,
integer lenmax,
ftnlen  lines_len 
)

create Fortran FREE lines from C++ FREE bock

Definition at line 164 of file helper.cc.

References fillfstring().

167  {
168  int ifline=0;
169  *lenmax=0;
170  typedef sff::FREE::Tlines Tlines;
171  Tlines::const_iterator I=free.lines.begin();
172  char* pfree=lines;
173  while ((I!=free.lines.end()) && (ifline< *lindim))
174  {
175  int linelen=static_cast<int>(I->length());
176  *lenmax= *lenmax>linelen ? *lenmax : linelen;
177  fillfstring(*I, pfree, lines_len);
178  ++I;
179  ++ifline;
180  pfree += lines_len;
181  }
182  *nline=static_cast<integer>(ifline);
183  } // freeblock(const ::sff::FREE& free,
long int integer
Fortran integer type.
Definition: fapidsff.h:66
void fillfstring(const std::string &s, char *fstring, ftnlen slen)
fill a Fortran string with a C++ string
Definition: helper.cc:60
Here is the call graph for this function: