static void periodic_dist(int ePBC,
- matrix box, rvec x[], int n, int index[],
+ matrix box, rvec x[], int n, const int index[],
real *rmin, real *rmax, int *min_ind)
{
#define NSHIFT_MAX 26
{
gmx_fatal(FARGS, "pbc = %s is not supported by g_mindist",
epbc_names[ePBC]);
- nsz = 0; /* Keep compilers quiet */
}
nshift = 0;
snew(leg, 1);
sprintf(buf, "Internal in %s", grpn[0]);
leg[0] = gmx_strdup(buf);
- xvgr_legend(dist, 0, (const char**)leg, oenv);
+ xvgr_legend(dist, 0, leg, oenv);
if (num)
{
- xvgr_legend(num, 0, (const char**)leg, oenv);
+ xvgr_legend(num, 0, leg, oenv);
}
}
else
leg[j] = gmx_strdup(buf);
}
}
- xvgr_legend(dist, j, (const char**)leg, oenv);
+ xvgr_legend(dist, j, leg, oenv);
if (num)
{
- xvgr_legend(num, j, (const char**)leg, oenv);
+ xvgr_legend(num, j, leg, oenv);
}
}
}
sprintf(buf, "%s-%s", grpn[0], grpn[i+1]);
leg[i] = gmx_strdup(buf);
}
- xvgr_legend(dist, ng-1, (const char**)leg, oenv);
+ xvgr_legend(dist, ng-1, leg, oenv);
if (num)
{
- xvgr_legend(num, ng-1, (const char**)leg, oenv);
+ xvgr_legend(num, ng-1, leg, oenv);
}
}
{
sprintf(buf, "%simum Distance", bMin ? "Min" : "Max");
respertime = xvgropen(rfile, buf, output_env_get_time_label(oenv), "Distance (nm)", oenv);
- xvgr_legend(respertime, ng-1, (const char**)leg, oenv);
+ xvgr_legend(respertime, ng-1, leg, oenv);
if (bPrintResName && output_env_get_print_xvgr_codes(oenv) )
{
fprintf(respertime, "# ");
sprintf(buf, "%simum Distance", bMin ? "Min" : "Max");
res = xvgropen(rfile, buf, "Residue (#)", "Distance (nm)", oenv);
- xvgr_legend(res, ng-1, (const char**)leg, oenv);
+ xvgr_legend(res, ng-1, leg, oenv);
for (j = 0; j < nres; j++)
{
fprintf(res, "%4d", j+1);
sfree(x0);
}
-static int find_residues(const t_atoms *atoms, int n, int index[], int **resindex)
+static int find_residues(const t_atoms *atoms, int n, const int index[], int **resindex)
{
int i;
int nres = 0, resnr, presnr = 0;