Remove unnecessary config.h includes
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / nm2type.c
index e9dd3961f18f3935f578f4c48f472923257bc2d2..d4b01a884dfae8a5dcdd3b11eda4fff0d509dccb 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 <string.h>
 
 #include "gromacs/math/utilities.h"
-#include "macros.h"
-#include "bondf.h"
+#include "gromacs/legacyheaders/macros.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/smalloc.h"
-#include "sysstuff.h"
 #include "gromacs/fileio/confio.h"
-#include "physics.h"
-#include "vec.h"
-#include "gromacs/math/3dview.h"
-#include "txtdump.h"
-#include "readinp.h"
-#include "names.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/txtdump.h"
+#include "gromacs/legacyheaders/readinp.h"
+#include "gromacs/legacyheaders/names.h"
 #include "toppush.h"
 #include "pdb2top.h"
 #include "gpp_nextnb.h"
@@ -62,7 +56,7 @@
 
 #include "nm2type.h"
 
-#include "gmx_fatal.h"
+#include "gromacs/utility/fatalerror.h"
 
 static void rd_nm2type_file(const char *fn, int *nnm, t_nm2type **nmp)
 {
@@ -110,7 +104,7 @@ static void rd_nm2type_file(const char *fn, int *nnm, t_nm2type **nmp)
                         {
                             gmx_fatal(FARGS, "Error on line %d of %s", line, libfilename);
                         }
-                        newbuf[i] = strdup(nbbuf);
+                        newbuf[i] = gmx_strdup(nbbuf);
                         strcat(format, "%*s%*s");
                     }
                 }
@@ -118,8 +112,8 @@ static void rd_nm2type_file(const char *fn, int *nnm, t_nm2type **nmp)
                 {
                     newbuf = NULL;
                 }
-                nm2t[nnnm].elem   = strdup(elem);
-                nm2t[nnnm].type   = strdup(type);
+                nm2t[nnnm].elem   = gmx_strdup(elem);
+                nm2t[nnnm].type   = gmx_strdup(type);
                 nm2t[nnnm].q      = qq;
                 nm2t[nnnm].m      = mm;
                 nm2t[nnnm].nbonds = nb;
@@ -201,7 +195,7 @@ static int match_str(const char *atom, const char *template_string)
     }
 }
 
-int nm2type(int nnm, t_nm2type nm2t[], t_symtab *tab, t_atoms *atoms,
+int nm2type(int nnm, t_nm2type nm2t[], struct t_symtab *tab, t_atoms *atoms,
             gpp_atomtype_t atype, int *nbonds, t_params *bonds)
 {
     int      cur = 0;