* 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 <ctype.h>
#include <string.h>
-#include "sysstuff.h"
-#include "smalloc.h"
-#include "typedefs.h"
-#include "symtab.h"
-#include "gromacs/fileio/futil.h"
+#include "gromacs/utility/smalloc.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/utility/futil.h"
#include "resall.h"
#include "h_db.h"
-#include "string2.h"
-#include "gmx_fatal.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
#include "ter_db.h"
#include "toputil.h"
#include "gromacs/fileio/gmxfio.h"
{
if (nr == 4)
{
- *nname = strdup(buf[i++]);
+ *nname = gmx_strdup(buf[i++]);
}
else
{
srenew(tb, maxnb);
}
clear_t_hackblock(&tb[nb]);
- tb[nb].name = strdup(header);
- tb[nb].filebase = strdup(filebase);
+ tb[nb].name = gmx_strdup(header);
+ tb[nb].filebase = gmx_strdup(filebase);
}
}
else
gmx_fatal(FARGS, "Reading Termini Database '%s': "
"expected atom name on line\n%s", fn, line);
}
- tb[nb].hack[nh].oname = strdup(buf);
+ tb[nb].hack[nh].oname = gmx_strdup(buf);
/* we only replace or delete one atom at a time */
tb[nb].hack[nh].nr = 1;
}
{
if (tb[nb].hack[nh].oname != NULL)
{
- tb[nb].hack[nh].nname = strdup(tb[nb].hack[nh].oname);
+ tb[nb].hack[nh].nname = gmx_strdup(tb[nb].hack[nh].oname);
}
else
{
{
if (sscanf(line+n, "%s%n", buf, &ni) == 1)
{
- tb[nb].rb[kwnr].b[tb[nb].rb[kwnr].nb].a[j] = strdup(buf);
+ tb[nb].rb[kwnr].b[tb[nb].rb[kwnr].nb].a[j] = gmx_strdup(buf);
}
else
{
}
strcpy(buf, "");
sscanf(line+n, "%s", buf);
- tb[nb].rb[kwnr].b[tb[nb].rb[kwnr].nb].s = strdup(buf);
+ tb[nb].rb[kwnr].b[tb[nb].rb[kwnr].nb].s = gmx_strdup(buf);
tb[nb].rb[kwnr].nb++;
}
else