Move truncate() wrapper to futil.h
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 19 Oct 2014 09:36:02 +0000 (12:36 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Thu, 23 Oct 2014 13:51:28 +0000 (16:51 +0300)
commitb30beef63c50c7ec4e15a8861ac97318ac97dcc4
treec2234db6a574a42884774752de6d333b76dff710
parentc2a48a0d95a8d04dbea70104d9cf29f362f11417
Move truncate() wrapper to futil.h

- Isolate platform-dependent file handling code better, removing
  some platform-dependent #ifdefs and #includes from higher-level files.
- Make 'gmx trjconv -trunc' independent of the platform (should now also
  work on Windows).
- Don't leak file handles when truncating on Windows.

Change-Id: I66162978c7b29499c8fc796d15b5f2649abf59dd
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxlib/checkpoint.cpp
src/gromacs/utility/futil.cpp
src/gromacs/utility/futil.h