gmx_test_xdr(GMX_SYSTEM_XDR)
if(NOT GMX_SYSTEM_XDR)
set(GMX_INTERNAL_XDR 1)
- set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_INTERNAL_XDR")
endif(NOT GMX_SYSTEM_XDR)
# include avx test source, used if the AVX flags are set below
enxio.h
filenm.h
futil.h
- gmx_system_xdr.h
gmxfio.h
matio.h
mdoutf.h
trnio.h
trx.h
trxio.h
- xdrf.h
+ xdr_datatype.h
xtcio.h
)
gmx_install_headers(fileio ${FILEIO_PUBLIC_HEADERS})
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-
#ifndef GMX_FILEIO_ENXIO_H
#define GMX_FILEIO_ENXIO_H
-#include "../legacyheaders/sysstuff.h"
#include "../legacyheaders/typedefs.h"
#include "../legacyheaders/pbc.h"
#include "gmxfio.h"
+#include "xdr_datatype.h"
#ifdef __cplusplus
extern "C" {
}
#endif
-#endif /* GMX_FILEIO_ENERIO_H */
+#endif
#include <stdio.h>
#include "../legacyheaders/typedefs.h"
-#include "xdrf.h"
#include "futil.h"
#ifdef __cplusplus
FILE *gmx_fio_getfp(t_fileio *fio);
/* Return the file pointer itself */
-XDR *gmx_fio_getxdr(t_fileio *fio);
-/* Return the file pointer itself */
-
-
-
-
/* Element with information about position in a currently open file.
* gmx_off_t should be defined by autoconf if your system does not have it.
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-
#ifndef GMX_FILEIO_GMXFIO_INT_H
#define GMX_FILEIO_GMXFIO_INT_H
-
/* This is the new improved and thread safe version of gmxfio. */
#define USE_XDR
#include "gromacs/legacyheaders/thread_mpi/lock.h"
+#include "xdrf.h"
/* the reader/writer functions for t_iotype */
typedef gmx_bool read_func (t_fileio *fio, void *item, int nitem, int eio,
#include <string.h>
#include "statutil.h"
#include "xdrf.h"
+#include "xdr_datatype.h"
#include "string2.h"
#include "futil.h"
#include "gmx_fatal.h"
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
+ * Copyright (c) 2001-2004, The GROMACS development team,
+ * Copyright (c) 2013, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+#ifndef GMX_FILEIO_XDR_DATATYPE_H
+#define GMX_FILEIO_XDR_DATATYPE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* the xdr data types; note that there is no data type 'real' because
+ here we deal with the types as they are actually written to disk. */
+typedef enum
+{
+ xdr_datatype_int,
+ xdr_datatype_float,
+ xdr_datatype_double,
+ xdr_datatype_large_int,
+ xdr_datatype_char,
+ xdr_datatype_string
+} xdr_datatype;
+
+/* names corresponding to the xdr_datatype enum */
+extern const char *xdr_datatype_names[];
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-
#ifndef GMX_FILEIO_XDRF_H
#define GMX_FILEIO_XDRF_H
-
#include <stdio.h>
#include "../legacyheaders/typedefs.h"
#define int64_t long long
#endif
-#include "../utility/gmx_header_config.h"
+#include "config.h"
+
#ifdef GMX_INTERNAL_XDR
#include "gmx_system_xdr.h"
#else
extern "C" {
#endif
-
-/* THESE 3 FUNCTIONS (xdropen, xdrclose and xdr_get_fp) ARE NOW OBSOLETE
- AND ONLY PROVIDED FOR BACKWARD COMPATIBILITY OF 3D PARTY TOOLS.
- THEY SHOULD NOT BE USED ANYWHERE IN GROMACS ITSELF.
- int xdropen(XDR *xdrs, const char *filename, const char *type);
- int xdrclose(XDR *xdrs);
- */
-
-/* the xdr data types; note that there is no data type 'real' because
- here we deal with the types as they are actually written to disk. */
-typedef enum
-{
- xdr_datatype_int,
- xdr_datatype_float,
- xdr_datatype_double,
- xdr_datatype_large_int,
- xdr_datatype_char,
- xdr_datatype_string
-} xdr_datatype;
-
-/* names corresponding to the xdr_datatype enum */
-extern const char *xdr_datatype_names[];
+struct t_fileio;
/* Read or write reduced precision *float* coordinates */
int xdr3dfcoord(XDR *xdrs, float *fp, int *size, float *precision);
int xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK);
+
+/* Defined in gmxfio.c.
+ * TODO: It would be nice to decouple this header from t_fileio completely,
+ * and not need the XDR struct in gmxfio.h, but that would require some
+ * extra code that is not warranted for this single function.
+ * Can be reconsidered if the file I/O gets refactored in the future.
+ */
+XDR *gmx_fio_getxdr(struct t_fileio *fio);
+/* Return the file pointer itself */
+
#ifdef __cplusplus
}
#endif
#include "../legacyheaders/typedefs.h"
#include "gmxfio.h"
-#include "xdrf.h"
#ifdef __cplusplus
extern "C" {
#include <sys/locking.h>
#endif
-
-#include "gromacs/fileio/filenm.h"
#include "names.h"
#include "typedefs.h"
#include "smalloc.h"
-#include "gromacs/fileio/gmxfio.h"
-#include "gromacs/fileio/xdrf.h"
#include "statutil.h"
#include "txtdump.h"
#include "vec.h"
#include "network.h"
#include "gmx_random.h"
#include "checkpoint.h"
-#include "gromacs/fileio/futil.h"
#include "string2.h"
#include <fcntl.h>
+#include "gromacs/fileio/filenm.h"
+#include "gromacs/fileio/futil.h"
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/xdrf.h"
+#include "gromacs/fileio/xdr_datatype.h"
+
#include "buildinfo.h"
#ifdef GMX_FAHCORE
-I src/gromacs/gmxpreprocess
-I src/programs/mdrun
--suppress=variableScope
+ --suppress=unnecessaryForwardDeclaration
--suppress=unusedVariable
--suppress=unreadVariable
--suppress=unusedStructMember