* 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 "gromacs/topology/index.h"
+#include "gmxpre.h"
-#include "config.h"
+#include "index.h"
#include <assert.h>
#include <ctype.h>
#include <algorithm>
-#include "gromacs/legacyheaders/macros.h"
-#include "gromacs/legacyheaders/txtdump.h"
-
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/strdb.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/topology/atoms.h"
#include "gromacs/topology/block.h"
#include "gromacs/topology/invblock.h"
srenew(b->index, b->nr+2);
srenew(*gnames, b->nr+1);
- (*gnames)[b->nr] = strdup(name);
+ (*gnames)[b->nr] = gmx_strdup(name);
srenew(b->a, b->nra+nra);
for (i = 0; (i < nra); i++)
if (l == nrestp)
{
srenew(restp, nrestp+1);
- restp[nrestp].rname = strdup(rname);
+ restp[nrestp].rname = gmx_strdup(rname);
restp[nrestp].bNeg = FALSE;
- restp[nrestp].gname = strdup(rname);
+ restp[nrestp].gname = gmx_strdup(rname);
nrestp++;
}
if (!found)
{
srenew(p_typename, ntypes+1);
- p_typename[ntypes++] = strdup(restype[i]);
+ p_typename[ntypes++] = gmx_strdup(restype[i]);
}
}
{
srenew(gb->index, gb->nr+2);
srenew(*gn, gb->nr+1);
- (*gn)[gb->nr] = strdup("Water_and_ions");
+ (*gn)[gb->nr] = gmx_strdup("Water_and_ions");
srenew(gb->a, gb->nra+nwater+nion);
if (nwater > 0)
{
b->index[0] = 0;
}
b->index[b->nr] = b->index[b->nr-1];
- (*grpname)[b->nr-1] = strdup(str);
+ (*grpname)[b->nr-1] = gmx_strdup(str);
}
else
{
fprintf(stderr, "There is one group in the index\n");
gnr1 = 0;
}
- gnames[i] = strdup(grpname[gnr1]);
+ gnames[i] = gmx_strdup(grpname[gnr1]);
isize[i] = grps->index[gnr1+1]-grps->index[gnr1];
snew(index[i], isize[i]);
for (j = 0; (j < isize[i]); j++)