Sanitize some include headers
authorMark Abraham <mark.j.abraham@gmail.com>
Sat, 10 Dec 2016 07:32:32 +0000 (18:32 +1100)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 20 Dec 2016 12:56:59 +0000 (23:56 +1100)
readinp.h was being used to acquire dependencies transitively, and was
being used where not required. Used some forward declarations where
suitable. Removed some C-style typedef struct to help with that.

This should help speed up compilation while doing some clean up I am
considering.

Change-Id: Iee7f0e523fdcc4c12d2a6a6e375b6739f63e65c5

19 files changed:
src/gromacs/fileio/readinp.h
src/gromacs/gmxana/gmx_analyze.cpp
src/gromacs/gmxana/gmx_make_edi.cpp
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_sham.cpp
src/gromacs/gmxana/gmx_tune_pme.cpp
src/gromacs/gmxpreprocess/genconf.cpp
src/gromacs/gmxpreprocess/nm2type.cpp
src/gromacs/gmxpreprocess/pdb2gmx.cpp
src/gromacs/gmxpreprocess/readir.h
src/gromacs/gmxpreprocess/readpull.cpp
src/gromacs/gmxpreprocess/readrot.cpp
src/gromacs/gmxpreprocess/topio.cpp
src/gromacs/gmxpreprocess/topio.h
src/gromacs/gmxpreprocess/toppush.cpp
src/gromacs/gmxpreprocess/x2top.cpp
src/gromacs/tools/convert_tpr.cpp
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/membed.cpp

index 0c3bb3542d60172fb46a391670efa26f17ce1f94..17f7d098c21f262afc24b57b9ce9a0d658183fd6 100644 (file)
 
 #include <cstring>
 
-#include "gromacs/fileio/warninp.h"
 #include "gromacs/utility/basedefinitions.h"
 
+struct warninp;
+typedef warninp *warninp_t;
+
 namespace gmx
 {
 class KeyValueTreeObject;
index bf9549a7c9077cd3489610e1d1cb3035e40e4a82..c7b477f4d1eee72a997086febc1ac96946ba8be9 100644 (file)
@@ -45,7 +45,6 @@
 #include "gromacs/correlationfunctions/autocorr.h"
 #include "gromacs/correlationfunctions/expfit.h"
 #include "gromacs/correlationfunctions/integrate.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
index 17e09ff3b632f6afa4e1367cf99fd73ffe27278e..ad3d4530b0a81b76dc0d11ecd1fd9c7066a6bd85 100644 (file)
@@ -46,7 +46,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/pdbio.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/eigio.h"
 #include "gromacs/gmxana/gmx_ana.h"
index 0b5ef29080927397907fd4c58f9a2b19bb6a65bd..e647bf04b0be6100ece204996d0ce756ed2d40f8 100644 (file)
@@ -43,7 +43,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fft/calcgrid.h"
 #include "gromacs/fileio/checkpoint.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxlib/network.h"
index dbd3838482d102b95669d498610979781405eb51..e8e8146ddac2b95ed8d51dd2790285bb836c092e 100644 (file)
@@ -46,7 +46,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/matio.h"
 #include "gromacs/fileio/pdbio.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
index 93df67f2503d56645b9b639e869466a2205f8d86..695f199c527c34bddb30d46c9679ffb04c377113 100644 (file)
@@ -50,7 +50,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fft/calcgrid.h"
 #include "gromacs/fileio/checkpoint.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/math/utilities.h"
index 807e5323cf85c18ecf784791182d65955dc81456..84587a391e788bbfd541730d61143355e5236297 100644 (file)
@@ -40,7 +40,6 @@
 
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/math/3dtransforms.h"
 #include "gromacs/math/utilities.h"
index 9359354cfa0c89b22887c0e1693cc2d3e9fc1a42..a68da1fd5419b499d0e07e0320041250d9334c66 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
@@ -44,7 +44,6 @@
 #include <algorithm>
 
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/gmxpreprocess/fflibutil.h"
 #include "gromacs/gmxpreprocess/gpp_atomtype.h"
 #include "gromacs/gmxpreprocess/gpp_nextnb.h"
index d8884265f5c8516022a122d282f108c2a6caa7dc..516a4cd6a2c16eb1ae0ddf975ea86870ceb342e0 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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.
@@ -47,7 +47,6 @@
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/pdbio.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/gmxlib/conformation-utilities.h"
 #include "gromacs/gmxpreprocess/fflibutil.h"
 #include "gromacs/gmxpreprocess/genhydro.h"
index 3552fea317a4b0aef54ecc51e766eb1870954e95..42b5669031e5d041d607799718fa852f6a6466a1 100644 (file)
@@ -38,7 +38,6 @@
 #ifndef GMX_GMXPREPROCESS_READIR_H
 #define GMX_GMXPREPROCESS_READIR_H
 
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/gmxpreprocess/grompp-impl.h"
 
 struct gmx_groups_t;
@@ -47,8 +46,11 @@ struct gmx_output_env_t;
 struct pull_params_t;
 struct pull_t;
 struct t_grpopts;
+struct t_inpfile;
 struct t_inputrec;
 struct t_rot;
+struct warninp;
+typedef warninp *warninp_t;
 
 enum {
     eshNONE, eshHBONDS, eshALLBONDS, eshHANGLES, eshALLANGLES, eshNR
@@ -58,7 +60,8 @@ enum {
     ecouplamVDWQ, ecouplamVDW, ecouplamQ, ecouplamNONE, ecouplamNR
 };
 
-typedef struct {
+struct t_gromppopts
+{
     int      warnings;
     int      nshake;
     char    *include;
@@ -74,7 +77,7 @@ typedef struct {
     int      couple_lam0;
     int      couple_lam1;
     gmx_bool bCoupleIntra;
-} t_gromppopts;
+};
 
 /*! \brief Initialise object to hold strings parsed from an .mdp file */
 void init_inputrec_strings();
index f07e366586af67e97b5f19b58bd9e8ba9eef5c96..4c407ef30edb6d9fdcca21f9d43a05047264f4ae 100644 (file)
@@ -41,6 +41,7 @@
 #include <string.h>
 
 #include "gromacs/fileio/readinp.h"
+#include "gromacs/fileio/warninp.h"
 #include "gromacs/gmxpreprocess/readir.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/mdatoms.h"
index c144c7d2b83fa61adc50781925a851b3558b90a5..91404be809d545dd73f14baed7603f3b648ac9d9 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, 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 "gmxpre.h"
 
+#include "gromacs/fileio/readinp.h"
 #include "gromacs/fileio/trrio.h"
+#include "gromacs/fileio/warninp.h"
 #include "gromacs/gmxpreprocess/readir.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vecdump.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/topology/block.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index eca8837aecb2068f7b8da59fdd80688878f9a6c7..0b2cd30e6d173f776daa11e14d6678792d21434c 100644 (file)
@@ -55,6 +55,7 @@
 #include "gromacs/gmxpreprocess/gpp_bond_atomtype.h"
 #include "gromacs/gmxpreprocess/gpp_nextnb.h"
 #include "gromacs/gmxpreprocess/grompp-impl.h"
+#include "gromacs/gmxpreprocess/readir.h"
 #include "gromacs/gmxpreprocess/topdirs.h"
 #include "gromacs/gmxpreprocess/toppush.h"
 #include "gromacs/gmxpreprocess/topshake.h"
index 27d8e70c4af0d4ff62243f4b02c55c18fd4842c5..4023f8fceb031ae6a01206c2197cff3801fc7bfd 100644 (file)
 
 #include "gromacs/gmxpreprocess/gpp_atomtype.h"
 #include "gromacs/gmxpreprocess/grompp-impl.h"
-#include "gromacs/gmxpreprocess/readir.h"
 
 struct gmx_molblock_t;
+struct gmx_mtop_t;
+struct t_gromppopts;
+struct t_inputrec;
+struct warninp;
+typedef warninp *warninp_t;
 
 double check_mol(gmx_mtop_t *mtop, warninp_t wi);
 /* Check mass and charge */
index a711e49c599b43939c2e9f23359d26a7e5b50cec..6b4f40f119a6aea4d1f76f9b5f3ba6b05db06733 100644 (file)
@@ -42,6 +42,7 @@
 #include <stdlib.h>
 
 #include <cmath>
+#include <cstring>
 
 #include <algorithm>
 
index 3307dba8c51b4fcd8212aacbe58ebf1ac6706def..6a189d284266d363cf468d7ce8875a4bc33d9455 100644 (file)
 #include "x2top.h"
 
 #include <cmath>
+#include <cstring>
 
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/gmxfio.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/gmxpreprocess/gen_ad.h"
 #include "gromacs/gmxpreprocess/gpp_nextnb.h"
 #include "gromacs/gmxpreprocess/hackblock.h"
index 21303d4339e861d03d90f75924cf42b02dcfefdd..a81324d405fae49edf5aae7b3034320c05147c27 100644 (file)
@@ -43,7 +43,6 @@
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trrio.h"
-#include "gromacs/gmxpreprocess/readir.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdrunutility/mdmodules.h"
 #include "gromacs/mdtypes/inputrec.h"
index 4d937a3b6260f5565cff47af633d45d64a16a738..1804ab4b3663d8865a739d2142702c938418cc54 100644 (file)
@@ -59,7 +59,6 @@
 
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/readinp.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/mdlib/main.h"
 #include "gromacs/mdlib/mdrun.h"
index ce15054cf88be6b169668a73a088d8b695b5f74d..bfe2d8011ef9bd82760e7b06501165cc7e1e40aa 100644 (file)
@@ -42,6 +42,7 @@
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/essentialdynamics/edsam.h"
 #include "gromacs/fileio/readinp.h"
+#include "gromacs/fileio/warninp.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/commrec.h"