* 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 "genhydro.h"
#include <string.h>
#include <time.h>
-#include "typedefs.h"
#include "gromacs/fileio/confio.h"
+#include "gromacs/gmxpreprocess/calch.h"
+#include "gromacs/gmxpreprocess/h_db.h"
+#include "gromacs/gmxpreprocess/pgutil.h"
+#include "gromacs/gmxpreprocess/resall.h"
+#include "gromacs/gmxpreprocess/ter_db.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/math/vec.h"
-#include "gromacs/utility/futil.h"
-#include "calch.h"
-#include "genhydro.h"
-#include "h_db.h"
-#include "ter_db.h"
-#include "resall.h"
-#include "pgutil.h"
-#include "network.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"
static void copy_atom(t_atoms *atoms1, int a1, t_atoms *atoms2, int a2)
{
atoms2->atom[a2] = atoms1->atom[a1];
snew(atoms2->atomname[a2], 1);
- *atoms2->atomname[a2] = strdup(*atoms1->atomname[a1]);
+ *atoms2->atomname[a2] = gmx_strdup(*atoms1->atomname[a1]);
}
static atom_id pdbasearch_atom(const char *name, int resind, t_atoms *pdba,
{
if (hb[rnr].name == NULL)
{
- hb[rnr].name = strdup(ahptr->name);
+ hb[rnr].name = gmx_strdup(ahptr->name);
}
merge_hacks(ahptr, &hb[rnr]);
}
{
if ( (*abi)[*nabi + k].oname == NULL)
{
- (*abi)[*nabi + k].nname = strdup(atomname);
+ (*abi)[*nabi + k].nname = gmx_strdup(atomname);
(*abi)[*nabi + k].nname[0] = 'H';
}
}
(*abi)[*nabi + k].oname ? (*abi)[*nabi + k].oname : "");
}
sfree((*abi)[*nabi + k].nname);
- (*abi)[*nabi + k].nname = strdup(hbr->hack[j].nname);
+ (*abi)[*nabi + k].nname = gmx_strdup(hbr->hack[j].nname);
}
if (hbr->hack[j].tp == 10 && k == 2)
ab[i][j].nname);
}
snew(newpdba->atomname[newi], 1);
- *newpdba->atomname[newi] = strdup(ab[i][j].nname);
+ *newpdba->atomname[newi] = gmx_strdup(ab[i][j].nname);
if (ab[i][j].oname != NULL && ab[i][j].atom) /* replace */
{ /* newpdba->atom[newi].m = ab[i][j].atom->m; */
/* newpdba->atom[newi].q = ab[i][j].atom->q; */