Fortran SFF API to data I/O streams in C++
fapid_sff_modwid2shift.cc
Go to the documentation of this file.
1 
35 #define TF_FAPID_SFF_MODWID2SHIFT_CC_VERSION \
36  "TF_FAPID_SFF_MODWID2SHIFT_CC V1.1"
37 
38 #include <fapidxx/fapidsff.h>
39 #include <fapidxx/wid2container.h>
40 #include <fapidxx/error.h>
41 
62 int sff_modwid2shift__(char *wid2line, real *tmin, real *
63  tsec, ftnlen wid2line_len)
64 {
65  fapidxx::WID2container wid2c(wid2line, wid2line_len);
66  libtime::TAbsoluteTime date(wid2c.wid2.date);
67  double tshift=double(*tsec)+60.*double(*tmin);
68  if (tshift < 0.)
69  { wid2c.wid2.date-=libtime::double2time(-tshift); }
70  else
71  { wid2c.wid2.date+=libtime::double2time(tshift); }
72  wid2c.encode(wid2line, wid2line_len);
73  return 0;
74 } // int sff_modwid2shift__
75 
76 /* ----- END OF fapid_sff_modwid2shift.cc ----- */
This is the interface usually expected by Fortran programs linking to libsff.a (prototypes) ...
sff::WID2 wid2
WID2 data.
This struct is used to pass WID2 line data within libfapidxx.
Definition: wid2container.h:62
container for WID2 data (prototypes)
exceptions and error handling macros (prototypes)
float real
Fortran real type (single precision)
Definition: fapidsff.h:73
long int ftnlen
Fortran string size type.
Definition: fapidsff.h:70
int sff_modwid2shift__(char *wid2line, real *tmin, real *tsec, ftnlen wid2line_len)
shift time of first sample in WID2 line
void encode(char *fstring, ftnlen slen) const
encode data into a character string depending on wasascii flag