Remove unnecessary config.h includes
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_rmsdist.c
index 4c190b3bfc92afaed662531291845141c7427136..504ba2abc285f8e307414267199abeb111665d8e 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 <math.h>
 
-#include "macros.h"
+#include "gromacs/legacyheaders/macros.h"
 #include "gromacs/utility/smalloc.h"
-#include "typedefs.h"
-#include "names.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/names.h"
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/strdb.h"
 #include "gromacs/math/vec.h"
-#include "macros.h"
+#include "gromacs/legacyheaders/macros.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/fileio/xvgr.h"
-#include "viewit.h"
+#include "gromacs/legacyheaders/viewit.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/fileio/matio.h"
 #include "gmx_ana.h"
@@ -188,14 +186,14 @@ static int read_equiv(const char *eq_fn, t_equiv ***equivptr)
         {
             lp += n;
             snew(equiv[neq], 1);
-            equiv[neq][0].nname = strdup(atomname);
+            equiv[neq][0].nname = gmx_strdup(atomname);
             while (sscanf(lp, "%d %s %s %n", &resnr, resname, atomname, &n) == 3)
             {
                 /* this is not efficient, but I'm lazy (again) */
                 srenew(equiv[neq], na+1);
                 equiv[neq][na].rnr   = resnr-1;
-                equiv[neq][na].rname = strdup(resname);
-                equiv[neq][na].aname = strdup(atomname);
+                equiv[neq][na].rname = gmx_strdup(resname);
+                equiv[neq][na].aname = gmx_strdup(atomname);
                 if (na > 0)
                 {
                     equiv[neq][na].nname = NULL;
@@ -269,7 +267,7 @@ static gmx_bool is_equiv(int neq, t_equiv **equiv, char **nname,
     }
     if (bFound)
     {
-        *nname = strdup(equiv[i-1][0].nname);
+        *nname = gmx_strdup(equiv[i-1][0].nname);
     }
 
     return bFound;
@@ -320,7 +318,7 @@ static int analyze_noe_equivalent(const char *eq_fn,
                                  rnrj, *atoms->resinfo[rnrj].name, *atoms->atomname[index[j]]);
                     if (nnm[i] && bEquiv)
                     {
-                        nnm[j] = strdup(nnm[i]);
+                        nnm[j] = gmx_strdup(nnm[i]);
                     }
                     if (bEquiv)
                     {
@@ -401,18 +399,18 @@ static int analyze_noe_equivalent(const char *eq_fn,
             noe_gr[gi].anr  = index[i];
             if (nnm[i])
             {
-                noe_gr[gi].aname = strdup(nnm[i]);
+                noe_gr[gi].aname = gmx_strdup(nnm[i]);
             }
             else
             {
-                noe_gr[gi].aname = strdup(*atoms->atomname[index[i]]);
+                noe_gr[gi].aname = gmx_strdup(*atoms->atomname[index[i]]);
                 if (noe_index[i] == noe_index[i+1])
                 {
                     noe_gr[gi].aname[strlen(noe_gr[gi].aname)-1] = '*';
                 }
             }
             noe_gr[gi].rnr   = atoms->atom[index[i]].resind;
-            noe_gr[gi].rname = strdup(*atoms->resinfo[noe_gr[gi].rnr].name);
+            noe_gr[gi].rname = gmx_strdup(*atoms->resinfo[noe_gr[gi].rnr].name);
             /* dump group definitions */
             if (debug)
             {
@@ -707,7 +705,7 @@ int gmx_rmsdist(int argc, char *argv[])
     };
 #define NFILE asize(fnm)
 
-    if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME | PCA_BE_NICE,
+    if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME,
                            NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
     {
         return 0;