Remove unnecessary config.h includes
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / resall.c
index a95fb1b27caaa57cf5faa675fec95761f5b6f9c4..b363023b1d31f0b8e768240af1ea9ccf9b6d1917 100644 (file)
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
 
 #include <ctype.h>
+#include <stdlib.h>
 #include <string.h>
 
-#include "sysstuff.h"
-#include "gromacs/utility/cstringutil.h"
-#include "gromacs/fileio/futil.h"
-#include "gromacs/utility/smalloc.h"
-#include "gmx_fatal.h"
-#include "symtab.h"
-#include "macros.h"
+#include "gromacs/legacyheaders/macros.h"
 #include "resall.h"
 #include "pgutil.h"
 #include "fflibutil.h"
 
 #include "gromacs/fileio/strdb.h"
+#include "gromacs/topology/symtab.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
 
 gpp_atomtype_t read_atype(const char *ffdir, t_symtab *tab)
 {
@@ -195,7 +193,7 @@ gmx_bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp)
         {
             if (sscanf(line+n, "%s%n", str, &ni) == 1)
             {
-                rtp->rb[bt].b[rtp->rb[bt].nb].a[j] = strdup(str);
+                rtp->rb[bt].b[rtp->rb[bt].nb].a[j] = gmx_strdup(str);
             }
             else
             {
@@ -212,7 +210,7 @@ gmx_bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp)
             n++;
         }
         rtrim(line+n);
-        rtp->rb[bt].b[rtp->rb[bt].nb].s = strdup(line+n);
+        rtp->rb[bt].b[rtp->rb[bt].nb].s = gmx_strdup(line+n);
         rtp->rb[bt].nb++;
     }
     /* give back unused memory */
@@ -452,8 +450,8 @@ void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp,
         {
             gmx_fatal(FARGS, "in .rtp file at line:\n%s\n", line);
         }
-        rrtp[nrtp].resname  = strdup(header);
-        rrtp[nrtp].filebase = strdup(filebase);
+        rrtp[nrtp].resname  = gmx_strdup(header);
+        rrtp[nrtp].filebase = gmx_strdup(filebase);
 
         get_a_line(in, line, STRLEN);
         bError       = FALSE;