35 #define TF_FAPID_SFF_ROPENS_CC_VERSION \ 36 "TF_FAPID_SFF_ROPENS_CC V1.0 " 80 char *code,
char *type__,
char *cs,
real *c1,
real *c2,
89 datrw::ianystream &is=
93 std::string ocode(
"");
94 if (is.hasfree()) { ocode.append(
"F"); }
95 if (is.hassrce()) { ocode.append(
"S"); }
96 if (is.hassrce()) { is >> srce; }
98 std::string srceline=srce.line();
101 char thecs=sff::coosysID(srce.cs);
103 *c1=
static_cast<real>(srce.cx);
104 *c2=
static_cast<real>(srce.cy);
105 *c3=
static_cast<real>(srce.cz);
106 fillfstring(srceline.substr(74,6), date, date_len);
107 fillfstring(srceline.substr(81,10), time, time_len);
110 fillfstring(stat.timestamp, timestamp, timestamp_len);
111 *version=
static_cast<real>(sff::STAT::libversion);
This is the interface usually expected by Fortran programs linking to libsff.a (prototypes) ...
long int integer
Fortran integer type.
void fillfstring(const std::string &s, char *fstring, ftnlen slen)
fill a Fortran string with a C++ string
int sff_ropens__(integer *lu, char *filename, real *version, char *timestamp, char *code, char *type__, char *cs, real *c1, real *c2, real *c3, char *date, char *time, integer *ierr, ftnlen filename_len, ftnlen timestamp_len, ftnlen code_len, ftnlen type_len, ftnlen cs_len, ftnlen date_len, ftnlen time_len)
Open SFF file and return source line.
float real
Fortran real type (single precision)
datrw::ianystream & open(const int &unit, const std::string &filename)
open a new file
long int ftnlen
Fortran string size type.
std::string stringfromfstring(char *fstring, ftnlen slen)
create a C++ string from a Fortran string
a file unit interface to libdatrwxx (prototypes)
::fapidxx::IFileUnits istreammanager
the global istream manager
some helper functions (prototypes)