* "WARNING during %s:", where warn is printed in %s.
*/
-float xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK);
-
- int xdr_xtc_seek_time(real time, FILE *fp, XDR *xdrs, int natoms,gmx_bool bSeekForwardOnly);
+int xdr_xtc_seek_time(real time, FILE *fp, XDR *xdrs, int natoms,gmx_bool bSeekForwardOnly);
int xdr_xtc_seek_frame(int frame, FILE *fp, XDR *xdrs, int natoms);
}
-
+static
float
xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
{
float tinit;
gmx_off_t off;
+ *bOK = 0;
if((off = gmx_ftell(fp)) < 0){
return -1;
}
tinit = xtc_get_current_frame_time(fp,xdrs,natoms,bOK);
- *bOK = 1;
-
if(!(*bOK))
{
return -1;
}
res -= tinit;
- if(gmx_fseek(fp,off,SEEK_SET)){
+ if (0 != gmx_fseek(fp,off,SEEK_SET)) {
*bOK = 0;
return -1;
}