* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#include "config.h"
+#include "gmxpre.h"
#include <stdio.h>
#include <math.h>
#include <ctype.h>
#include "gromacs/math/vec.h"
-#include "macros.h"
+#include "gromacs/legacyheaders/macros.h"
#include "gromacs/utility/futil.h"
#include "pdb2top.h"
#include "gpp_nextnb.h"
#include "add_par.h"
#include "toputil.h"
#include "fflibutil.h"
-#include "copyrite.h"
+#include "gromacs/legacyheaders/copyrite.h"
#include "gromacs/fileio/strdb.h"
#include "gromacs/topology/residuetypes.h"
ptr = strrchr(ffdirs[i], '/');
if (ptr == NULL)
{
- ffs[i] = strdup(ffdirs[i]);
+ ffs[i] = gmx_strdup(ffdirs[i]);
ffs_dir[i] = low_gmxlibfn(ffdirs[i], FALSE, FALSE);
if (ffs_dir[i] == NULL)
{
}
else
{
- ffs[i] = strdup(ptr+1);
- ffs_dir[i] = strdup(ffdirs[i]);
+ ffs[i] = gmx_strdup(ptr+1);
+ ffs_dir[i] = gmx_strdup(ffdirs[i]);
}
ffs_dir[i][strlen(ffs_dir[i])-strlen(ffs[i])-1] = '\0';
/* Remove the extension from the ffdir name */
}
else
{
- desc[i] = strdup(ffs[i]);
+ desc[i] = gmx_strdup(ffs[i]);
}
}
/* Order force fields from the same dir alphabetically
}
else if (strcmp(wmsel, "select") != 0)
{
- *watermodel = strdup(wmsel);
+ *watermodel = gmx_strdup(wmsel);
return;
}
}
else
{
- *watermodel = strdup(model[sel]);
+ *watermodel = gmx_strdup(model[sel]);
}
for (i = 0; i < nwm; i++)
}
snew( restp->atomname[at_start+1+k], 1);
restp->atom [at_start+1+k] = *hack->atom;
- *restp->atomname[at_start+1+k] = strdup(buf);
+ *restp->atomname[at_start+1+k] = gmx_strdup(buf);
if (hack->cgnr != NOTSET)
{
restp->cgnr [at_start+1+k] = hack->cgnr;
}
snew( (*restp)[i].atomname[l], 1);
(*restp)[i].atom[l] = *(*hb)[i].hack[j].atom;
- *(*restp)[i].atomname[l] = strdup((*hb)[i].hack[j].nname);
+ *(*restp)[i].atomname[l] = gmx_strdup((*hb)[i].hack[j].nname);
if ( (*hb)[i].hack[j].cgnr != NOTSET)
{
(*restp)[i].cgnr [l] = (*hb)[i].hack[j].cgnr;
}
/* Rename the atom in pdba */
snew(pdba->atomname[atind], 1);
- *pdba->atomname[atind] = strdup(newnm);
+ *pdba->atomname[atind] = gmx_strdup(newnm);
}
else if (hbr->hack[j].oname != NULL && hbr->hack[j].nname == NULL &&
gmx_strcasecmp(oldnm, hbr->hack[j].oname) == 0)