Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / fileio / libxdrf.c
index 14c750190067f0181998b79d4d972f06d210c32a..90e58d4ee251c740b9281b023a106ac9b24e326c 100644 (file)
@@ -34,9 +34,7 @@
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
 
 #include <limits.h>
 #include <math.h>
@@ -44,9 +42,9 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "xdrf.h"
-#include "xdr_datatype.h"
-#include "futil.h"
+#include "gromacs/fileio/xdr_datatype.h"
+#include "gromacs/fileio/xdrf.h"
+#include "gromacs/utility/futil.h"
 
 /* This is just for clarity - it can never be anything but 4! */
 #define XDR_INT_SIZE 4
@@ -1443,7 +1441,7 @@ int xdr_xtc_seek_time(real time, FILE *fp, XDR *xdrs, int natoms, gmx_bool bSeek
 
     if (bSeekForwardOnly)
     {
-        low = gmx_ftell(fp);
+        low = gmx_ftell(fp)-header_size;
     }
     if (gmx_fseek(fp, 0, SEEK_END))
     {