* the research papers on the package. Check out http://www.gromacs.org.
*/
/* This file is completely threadsafe - keep it that way! */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
-#include <string.h>
#include "hackblock.h"
+
+#include <string.h>
+
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/smalloc.h"
-#include "vec.h"
-#include "macros.h"
/* these MUST correspond to the enum in hackblock.h */
const char *btsNames[ebtsNR] = { "bonds", "angles", "dihedrals", "impropers", "exclusions", "cmap" };
free_t_bondeds(&(*rtp)[i].rb[j]);
}
}
- free(*rtp);
+ sfree(*rtp);
}
void free_t_hack(int nh, t_hack **h)
}
}
-#define safe_strdup(str) ((str != NULL) ? strdup(str) : NULL)
+#define safe_strdup(str) ((str != NULL) ? gmx_strdup(str) : NULL)
static void copy_t_rbonded(t_rbonded *s, t_rbonded *d)
{
{
d->a[i] = safe_strdup(s->a[i]);
}
- d->s = safe_strdup(s->s);
+ d->s = safe_strdup(s->s);
+ d->match = s->match;
}
static gmx_bool contains_char(t_rbonded *s, char c)
}
fprintf(out, " %s]", SS(hb[i].rb[j].b[k].s));
}
- fprintf(out, "\n");
+ fprintf(out, " Entry matched: %s\n", yesno_names[hb[i].rb[j].b[k].match]);
}
}
fprintf(out, "\n");