"""Scan the file contents and initialize information based on it."""
# TODO: Consider a more robust regex.
include_re = r'^\s*#\s*include\s+(?P<quote>["<])(?P<path>[^">]*)[">]'
- define_re = r'^\s*#.*define\s+(\w*)'
+ define_re = r'^\s*#.*define(?:01)?\s+(\w*)'
current_block = None
with open(self._abspath, 'r') as scanfile:
contents = scanfile.read()
/* IEEE754 floating-point format. Memory layout is defined by macros
* GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER.
*/
-#cmakedefine GMX_FLOAT_FORMAT_IEEE754
+#cmakedefine01 GMX_FLOAT_FORMAT_IEEE754
/* Work around broken calloc() */
#cmakedefine GMX_BROKEN_CALLOC
#define GMX_SIMD_ACCURACY_BITS_DOUBLE @GMX_SIMD_ACCURACY_BITS_DOUBLE@
/* Integer byte order is big endian. */
-#cmakedefine GMX_INTEGER_BIG_ENDIAN
+#cmakedefine01 GMX_INTEGER_BIG_ENDIAN
/* Use our own instead of system XDR libraries */
-#cmakedefine GMX_INTERNAL_XDR
+#cmakedefine01 GMX_INTERNAL_XDR
/* Compile to use TNG library */
#cmakedefine GMX_USE_TNG
/* Bytes in IEEE fp word are in big-endian order if set, little-endian if not.
Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
-#cmakedefine GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
+#cmakedefine01 GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
/* The two words in a double precision variable are in b ig-endian order if
set, little-endian if not. Do NOT assume this is the same as the byte
order! Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
-#cmakedefine GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#cmakedefine01 GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
/* Define if SIGUSR1 is present */
#cmakedefine HAVE_SIGUSR1
#include "config.h"
-#ifdef GMX_INTERNAL_XDR
+#if GMX_INTERNAL_XDR
#include "gmx_system_xdr.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2014,2015, 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.
#include "config.h"
-#ifdef GMX_INTEGER_BIG_ENDIAN
+#if GMX_INTEGER_BIG_ENDIAN
#define ARCH_IS_BIG_ENDIAN 1
#else
#define ARCH_IS_BIG_ENDIAN 0
#include "config.h"
-#ifdef GMX_INTERNAL_XDR
+#if GMX_INTERNAL_XDR
#include "gromacs/fileio/gmx_system_xdr.h"
#else
#include <rpc/rpc.h>
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
double gmx_erfd(double x)
{
-#ifdef GMX_FLOAT_FORMAT_IEEE754
+#if GMX_FLOAT_FORMAT_IEEE754
gmx_int32_t hx, ix, i;
double R, S, P, Q, s, y, z, r;
conv.d = x;
-#ifdef GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#if GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
hx = conv.i[0];
#else
hx = conv.i[1];
conv.d = x;
-#ifdef GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#if GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
conv.i[1] = 0;
#else
conv.i[0] = 0;
double gmx_erfcd(double x)
{
-#ifdef GMX_FLOAT_FORMAT_IEEE754
+#if GMX_FLOAT_FORMAT_IEEE754
gmx_int32_t hx, ix;
double R, S, P, Q, s, y, z, r;
conv.d = x;
-#ifdef GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#if GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
hx = conv.i[0];
#else
hx = conv.i[1];
conv.d = x;
-#ifdef GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#if GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
conv.i[1] = 0;
#else
conv.i[0] = 0;