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

◆ sff_wopen__()

int sff_wopen__ ( integer lu,
char *  filename,
integer ierr,
ftnlen  filename_len 
)

Open file for writing.

Description from stuff.f:

c----------------------------------------------------------------------
subroutine sff_WOpen(lu, filename, ierr)
c
c Open file for writing. Write STAT line.
c
c input:
c lu logical file unit
c filename name of file
c output:
c ierr error status (ok: ierr=0)
c
integer lu, ierr
character filename*(*)
c----------------------------------------------------------------------

Definition at line 66 of file fapid_sff_wopen.cc.

References fapidxx::OFileUnits::open(), fapidxx::ostreammanager, and fapidxx::stringfromfstring().

68 {
69  int retval=0;
70  *ierr=0;
71  try {
72  datrw::oanystream &os=
73  ostreammanager.open(static_cast<int>(*lu),
74  stringfromfstring(filename, filename_len));
75  }
76  catch (...) {
77  *ierr=1;
78  }
79  return(retval);
80 } // int sff_wopen__
datrw::oanystream & open(const int &unit, const std::string &filename)
open a new file
Definition: fileunit.cc:147
::fapidxx::OFileUnits ostreammanager
the global ostream manager
Definition: fileunit.cc:51
std::string stringfromfstring(char *fstring, ftnlen slen)
create a C++ string from a Fortran string
Definition: helper.cc:51
Here is the call graph for this function: