Remove unnecessary config.h includes
[alexxy/gromacs.git] / src / gromacs / mdlib / ebin.c
index 986b87a2c07a2bb155e0c6dfb0a9f1ecfeacb9e3..33a0742130c8aaf96893ad22a087d43c134bf7f9 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 <math.h>
 #include <string.h>
-#include "sysstuff.h"
-#include "smalloc.h"
-#include "typedefs.h"
-#include "gmx_fatal.h"
-#include "string2.h"
-#include "ebin.h"
-#include "main.h"
+#include "gromacs/utility/smalloc.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/legacyheaders/ebin.h"
 #include "gromacs/math/utilities.h"
-#include "vec.h"
-#include "physics.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/math/units.h"
 
 t_ebin *mk_ebin(void)
 {
@@ -80,10 +75,10 @@ int get_ebin_space(t_ebin *eb, int nener, const char *enm[], const char *unit)
         eb->e_sim[i].e    = 0;
         eb->e_sim[i].eav  = 0;
         eb->e_sim[i].esum = 0;
-        eb->enm[i].name   = strdup(enm[i-index]);
+        eb->enm[i].name   = gmx_strdup(enm[i-index]);
         if (unit != NULL)
         {
-            eb->enm[i].unit = strdup(unit);
+            eb->enm[i].unit = gmx_strdup(unit);
         }
         else
         {
@@ -110,7 +105,7 @@ int get_ebin_space(t_ebin *eb, int nener, const char *enm[], const char *unit)
                     }
                 }
             }
-            eb->enm[i].unit = strdup(u);
+            eb->enm[i].unit = gmx_strdup(u);
         }
     }
 
@@ -279,7 +274,7 @@ int main(int argc, char *argv[])
     {
         e[i] = i;
         sprintf(buf, "e%d", i);
-        ce[i] = strdup(buf);
+        ce[i] = gmx_strdup(buf);
     }
     ie = get_ebin_space(eb, NE, ce);
     add_ebin(eb, ie, NE, e, 0);
@@ -287,7 +282,7 @@ int main(int argc, char *argv[])
     {
         s[i] = i;
         sprintf(buf, "s%d", i);
-        cs[i] = strdup(buf);
+        cs[i] = gmx_strdup(buf);
     }
     is = get_ebin_space(eb, NS, cs);
     add_ebin(eb, is, NS, s, 0);
@@ -295,7 +290,7 @@ int main(int argc, char *argv[])
     {
         t[i] = i;
         sprintf(buf, "t%d", i);
-        ct[i] = strdup(buf);
+        ct[i] = gmx_strdup(buf);
     }
     it = get_ebin_space(eb, NT, ct);
     add_ebin(eb, it, NT, t, 0);