*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include <cstring>
#include <algorithm>
+#include <string>
#include "gromacs/commandline/pargs.h"
#include "gromacs/commandline/viewit.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/stringutil.h"
#define FUDGE 1.2
#define DDD 2
int mapoffset)
{
const char *libm2p;
- char buf[256], *legend;
+ char *legend;
t_psdata out;
t_psrec psrec, *psr;
int W, H;
/* Print title, if any */
ps_rgb(out, BLACK);
ps_strfont(out, psr->titfont, psr->titfontsize);
+ std::string buf;
if (!mat2 || (std::strcmp(mat[i].title, mat2[i].title) == 0))
{
- std::strcpy(buf, mat[i].title);
+ buf = mat[i].title;
}
else
{
- sprintf(buf, "%s / %s", mat[i].title, mat2[i].title);
+ buf = gmx::formatString("%s / %s", mat[i].title, mat2[i].title);
}
ps_ctext(out, x0+w/2, y0+box_height(&(mat[i]), psr)+psr->titfontsize,
- buf, eXCenter);
+ buf.c_str(), eXCenter);
}
- sprintf(buf, "Here starts the filling of box #%d", i);
- ps_comment(out, buf);
+ ps_comment(out, gmx::formatString("Here starts the filling of box #%d", i).c_str());
for (x = 0; (x < mat[i].nx); x++)
{
int nexty;
#include <cmath>
#include <algorithm>
+#include <string>
#include "gromacs/fileio/readinp.h"
#include "gromacs/fileio/warninp.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/stringutil.h"
#define MAXPTR 254
#define NOGID 255
if (strlen(is->deform) > 0 && ndeform != 6)
{
- sprintf(warn_buf, "Cannot parse exactly 6 box deformation velocities from string '%s'", is->deform);
- warning_error(wi, warn_buf);
+ warning_error(wi, gmx::formatString("Cannot parse exactly 6 box deformation velocities from string '%s'", is->deform).c_str());
}
for (i = 0; i < 3; i++)
{