int *nb;
} t_nnb;
-void pr_energy(FILE *fp, real e)
-{
- fprintf(fp, "Energy: %8.4f\n", e);
-}
-
void cp_index(int nn, int from[], int to[])
{
int i;
gmx_bool bFit, FILE *log, t_rgb rlo, t_rgb rhi,
const output_env_t oenv)
{
- FILE *fp = NULL;
+ FILE *size_fp = NULL;
char buf[STRLEN], buf1[40], buf2[40], buf3[40], *trxsfn;
t_trxstatus *trxout = NULL;
t_trxstatus *trxsout = NULL;
if (clustidfn)
{
- fp = xvgropen(clustidfn, "Clusters", output_env_get_xvgr_tlabel(oenv), "Cluster #", oenv);
+ FILE *fp = xvgropen(clustidfn, "Clusters", output_env_get_xvgr_tlabel(oenv), "Cluster #", oenv);
if (output_env_get_print_xvgr_codes(oenv))
{
fprintf(fp, "@ s0 symbol 2\n");
}
if (sizefn)
{
- /* FIXME: This file is never closed. */
- fp = xvgropen(sizefn, "Cluster Sizes", "Cluster #", "# Structures", oenv);
+ size_fp = xvgropen(sizefn, "Cluster Sizes", "Cluster #", "# Structures", oenv);
if (output_env_get_print_xvgr_codes(oenv))
{
- fprintf(fp, "@g%d type %s\n", 0, "bar");
+ fprintf(size_fp, "@g%d type %s\n", 0, "bar");
}
}
snew(structure, nf);
}
if (sizefn)
{
- fprintf(fp, "%8d %8d\n", cl, nstr);
+ fprintf(size_fp, "%8d %8d\n", cl, nstr);
}
clrmsd = 0;
midstr = 0;
{
sfree(trxsfn);
}
+
+ if (size_fp)
+ {
+ xvgrclose(size_fp);
+ }
}
static void convert_mat(t_matrix *mat, t_mat *rms)