Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / tomorse.c
index 5bcf84f73756f10bca574acdd659e9ed26a719bb..f1781e90432994261ac8dde60a65d6f2711efe93 100644 (file)
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 /* This file is completely threadsafe - keep it that way! */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "tomorse.h"
 
 #include <ctype.h>
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "typedefs.h"
+#include "gromacs/gmxpreprocess/gpp_atomtype.h"
+#include "gromacs/gmxpreprocess/grompp-impl.h"
+#include "gromacs/gmxpreprocess/toputil.h"
+#include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/utility/cstringutil.h"
-#include "grompp-impl.h"
-#include "gromacs/fileio/futil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
-#include "toputil.h"
-#include "gmx_fatal.h"
-#include "gpp_atomtype.h"
-#include "macros.h"
-
-#include "tomorse.h"
 
 typedef struct {
     char *ai, *aj;
@@ -87,8 +84,8 @@ static t_2morse *read_dissociation_energies(int *n2morse)
                 srenew(t2m, maxn2m);
             }
             /* Copy the values */
-            t2m[n2m].ai     = strdup(ai);
-            t2m[n2m].aj     = strdup(aj);
+            t2m[n2m].ai     = gmx_strdup(ai);
+            t2m[n2m].aj     = gmx_strdup(aj);
             t2m[n2m].e_diss = e_diss;
             /* Increment counter */
             n2m++;
@@ -283,6 +280,7 @@ void convert_harmonics(int nrmols, t_molinfo mols[], gpp_atomtype_t atype)
                         last++;
                     }
                 }
+                /* cppcheck-suppress uninitvar Fixed in cppcheck 1.65 */
                 sfree(bRemoveHarm);
                 fprintf(stderr, "Converted %d out of %d %s to morse bonds for mol %d\n",
                         nrharm-last, nrharm, interaction_function[bb].name, i);