-readability-function-size,-readability-else-after-return,
modernize-use-nullptr,modernize-use-emplace,
modernize-make-unique,modernize-make-shared,
+ modernize-avoid-bind,
+ modernize-redundant-void-arg,modernize-use-bool-literals,
cppcoreguidelines-*,-cppcoreguidelines-pro-*,-cppcoreguidelines-owning-memory,
-cppcoreguidelines-no-malloc,-cppcoreguidelines-special-member-functions,
google-*,-google-build-using-namespace,-google-explicit-constructor,
#include "awh.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include "bias.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include "biasstate.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include "biaswriter.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include "gromacs/awh/awh.h"
#include "correlationhistory.h"
-#include <assert.h>
+#include <cassert>
#include "gromacs/gmxlib/network.h"
#include "gromacs/mdtypes/awh-correlation-history.h"
#include "correlationtensor.h"
-#include <assert.h>
+#include <cassert>
#include "gromacs/math/functions.h"
#include "gromacs/math/utilities.h"
#include "grid.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include <cstring>
#include "autocorr.h"
-#include <stdio.h>
-#include <string.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstring>
#include <algorithm>
#include "expfit.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, 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 "integrate.h"
-#include <stdio.h>
-
#include <cmath>
+#include <cstdio>
#include "gromacs/math/functions.h"
#include "gromacs/math/vec.h"
#include "config.h"
-#include <assert.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
+#include <climits>
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "domdec_constraints.h"
-#include <assert.h>
+#include <cassert>
#include <algorithm>
#include "config.h"
-#include <string.h>
+#include <cstring>
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/utility/gmxmpi.h"
#include "gmxpre.h"
-#include <assert.h>
-#include <stdio.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdio>
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
#include "domdec_specatomcomm.h"
-#include <assert.h>
+#include <cassert>
#include <algorithm>
#include "gmxpre.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
#include <cassert>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include <string>
#include "domdec_vsite.h"
-#include <assert.h>
+#include <cassert>
#include <algorithm>
#include "edsam.h"
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstring>
+#include <ctime>
#include "gromacs/commandline/filenm.h"
#include "gromacs/compat/make_unique.h"
#include "ewald.h"
-#include <stdio.h>
-
#include <cmath>
+#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include "pme-load-balancing.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include <algorithm>
#include "config.h"
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <memory>
#include <numeric>
#include "config.h"
-#include <stdio.h>
-
+#include <cstdio>
#include <cstring>
#include "gromacs/domdec/domdec.h"
#include "config.h"
-#include <assert.h>
+#include <cassert>
#include <algorithm>
#include "config.h"
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include <list>
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2003 Erik Lindahl, David van der Spoel, University of Groningen.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, 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 "config.h"
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/math/gmxcomplex.h"
#include "gromacs/utility/fatalerror.h"
#include "config.h"
-#include <assert.h>
-#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
+#include <cfloat>
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "config.h"
-#include <errno.h>
-#include <stdlib.h>
+#include <cerrno>
+#include <cstdlib>
#include <fftw3.h>
#include "parallel_3dfft.h"
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/fft/fft.h"
#include "gromacs/fft/fft5d.h"
}
/* make a dummy head element, assuming we locked everything. */
-static void gmx_fio_make_dummy(void)
+static void gmx_fio_make_dummy()
{
if (!open_files)
{
/* get the first open file, or NULL if there is none.
Returns a locked fio. Assumes open_files_mutex is locked. */
-static t_fileio *gmx_fio_get_first(void)
+static t_fileio *gmx_fio_get_first()
{
t_fileio *ret;
-t_fileio *gmx_fio_all_output_fsync(void)
+t_fileio *gmx_fio_all_output_fsync()
{
t_fileio *ret = nullptr;
t_fileio *cur;
* we can truncate output files upon restart-with-appending. */
std::vector<gmx_file_position_t> gmx_fio_get_output_file_positions();
-t_fileio *gmx_fio_all_output_fsync(void);
+t_fileio *gmx_fio_all_output_fsync();
/* fsync all open output files. This is used for checkpointing, where
we need to ensure that all output is actually written out to
disk.
/* read one int just to make sure we dont read this frame but the next */
xdr_int(xdrs, &step);
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
float time;
int step;
int ret;
- *bOK = 0;
+ *bOK = false;
if ((off = gmx_ftell(fp)) < 0)
{
}
/* read one int just to make sure we dont read this frame but the next */
xdr_int(xdrs, &step);
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
{
- *bOK = 1;
+ *bOK = true;
if (gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return time;
int step;
float time;
int ret;
- *bOK = 0;
+ *bOK = false;
if ((off = gmx_ftell(fp)) < 0)
{
return -1;
}
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
{
- *bOK = 1;
+ *bOK = true;
if (gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return time;
int ret;
int step;
float time;
- *bOK = 0;
+ *bOK = false;
if ((off = gmx_ftell(fp)) < 0)
{
}
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
{
- *bOK = 1;
+ *bOK = true;
if (gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return step;
float time;
/* read one int just to make sure we dont read this frame but the next */
xdr_int(xdrs, &step);
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
float tinit;
gmx_off_t off;
- *bOK = 0;
+ *bOK = false;
if ((off = gmx_ftell(fp)) < 0)
{
return -1;
res -= tinit;
if (0 != gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return res;
return -1;
}
- while (1)
+ while (true)
{
fr = xtc_get_next_frame_number(fp, xdrs, natoms);
if (fr < 0)
}
*/
- while (1)
+ while (true)
{
dt = xdr_xtc_estimate_dt(fp, xdrs, natoms, &bOK);
if (!bOK)
{
float time;
gmx_off_t off;
- *bOK = 1;
+ *bOK = true;
off = gmx_ftell(fp);
if (off < 0)
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
if (gmx_fseek(fp, -3*XDR_INT_SIZE, SEEK_END) != 0)
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
if (gmx_fseek(fp, off, SEEK_SET) != 0)
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return time;
{
int frame;
gmx_off_t off;
- *bOK = 1;
+ *bOK = true;
if ((off = gmx_ftell(fp)) < 0)
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
if (gmx_fseek(fp, -3*XDR_INT_SIZE, SEEK_END))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
if (gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
{
int i, j, k, idum = 0;
real rdum;
- gmx_bool bdum = 0;
+ gmx_bool bdum = false;
if (file_version != tpx_version)
{
/* */
/*****************************************************************************/
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
/*
* Plugin header files; get plugin source from www.ks.uiuc.edu/Research/vmd"
#include "gromacs/utility/smalloc.h"
-typedef int (*initfunc)(void);
+typedef int (*initfunc)();
typedef int (*regfunc)(void *, vmdplugin_register_cb);
-typedef int (*finifunc)(void);
+typedef int (*finifunc)();
if (rc < 0)
{
vmdplugin->api->close_file_read(vmdplugin->handle);
- return 0;
+ return false;
}
#if GMX_DOUBLE
}
#endif
- fr->bX = 1;
- fr->bBox = 1;
+ fr->bX = true;
+ fr->bBox = true;
vec[0] = .1*ts.A; vec[1] = .1*ts.B; vec[2] = .1*ts.C;
angle[0] = ts.alpha; angle[1] = ts.beta; angle[2] = ts.gamma;
matrix_convert(fr->box, vec, angle);
}
- return 1;
+ return true;
}
static int load_vmd_library(const char *fn, gmx_vmdplugin_t *vmdplugin)
snew(fr->x, fr->natoms);
- vmdplugin->bV = 0;
+ vmdplugin->bV = false;
if (vmdplugin->api->abiversion > 10 && vmdplugin->api->read_timestep_metadata)
{
vmdplugin->api->read_timestep_metadata(vmdplugin->handle, metadata);
numDim_(0),
firstGraphSubBlock_(0),
numGraph_(0),
- useKTForEnergy_(0)
+ useKTForEnergy_(false)
{
baseFilename_ = filename.substr(0, filename.find('.'));
lc_in = lc_out;
}
- while (1)
+ while (true)
{
if (!start_reached)
{
gmx_rmpbc_done(gpbc);
close_trx(status);
- if (/* DISABLES CODE */ (0))
+ if (/* DISABLES CODE */ (false))
{
FILE *fp;
fp = fopen("koko.xvg", "w");
snew(top, ntop);
}
-static void reset5(void)
+static void reset5()
{
int i;
static gmx_bool is_hb(const unsigned int hbexist[], int frame)
{
- return ((hbexist[OFFSET(frame)] & MASK(frame)) != 0) ? 1 : 0;
+ return (hbexist[OFFSET(frame)] & MASK(frame)) != 0;
}
static void set_hb(t_hbdata *hb, int id, int ih, int ia, int frame, int ihb)
&xref1, &edi_params.fitmas, &xav1, &edi_params.pcamas, &nvec1, &eignr1, &eigvec1, &eigval1);
read_tps_conf(ftp2fn(efTPS, NFILE, fnm),
- &top, &ePBC, &xtop, nullptr, topbox, 0);
+ &top, &ePBC, &xtop, nullptr, topbox, false);
atoms = &top.atoms;
beginfit, endfit);
nat_trx =
- corr_loop(msd, trx_file, top, ePBC, mol_file ? gnx[0] : 0, gnx, index,
+ corr_loop(msd, trx_file, top, ePBC, mol_file ? gnx[0] : false, gnx, index,
(mol_file != nullptr) ? calc1_mol : (bMW ? calc1_mw : calc1_norm),
bTen, gnx_com, index_com, dt, t_pdb,
pdb_file ? &x : nullptr, box, oenv);
static int ngrps = 1;
static gmx_bool bSpherical = FALSE; /* default is bilayer types */
static real fudge_z = 0; /* translate coordinates */
- static gmx_bool bCorrect = 0;
+ static gmx_bool bCorrect = false;
t_pargs pa [] = {
{ "-d", FALSE, etSTR, {&axtitle},
"Take the normal on the membrane in direction X, Y or Z." },
/* Check for number of files disabled, as FOPEN_MAX is not the correct
* number to check for. In my linux box it is only 16.
*/
- if (/* DISABLES CODE */ (0) && (clust->clust->nr > FOPEN_MAX-4))
+ if (/* DISABLES CODE */ (false))
+ //if (clust->clust->nr > FOPEN_MAX-4)
{
gmx_fatal(FARGS, "Can not open enough (%d) files to write all the"
" trajectories.\ntry splitting the index file in %d parts.\n"
double temp, time, time0 = 0, dt;
char *ptr = nullptr;
t_UmbrellaWindow * window = nullptr;
- gmx_bool timeok, dt_ok = 1;
+ gmx_bool timeok, dt_ok = true;
char *tmpbuf = nullptr, fmt[256], fmtign[256], fmtlf[5] = "%lf";
int len = STRLEN, dstep = 1;
const int blocklen = 4096;
{
char Buffer[1024], gunzip[1024], *Path = nullptr;
FILE *pipe = nullptr;
- static gmx_bool bFirst = 1;
+ static gmx_bool bFirst = true;
/* gzipped pdo file? */
if ((std::strcmp(fn+std::strlen(fn)-3, ".gz") == 0))
if (bFirst)
{
printf("Using gunzip executable %s\n", gunzip);
- bFirst = 0;
+ bFirst = false;
}
if (!gmx_fexist(fn))
{
struct t_commrec;
struct t_filenm;
-struct t_commrec *init_commrec(void);
+struct t_commrec *init_commrec();
/* Allocate, initialize and return the commrec. */
void done_commrec(t_commrec *cr);
#include "config.h"
-#include <math.h>
+#include <cmath>
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/math/functions.h"
#include "add_par.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
#include "convparm.h"
-#include <string.h>
-
#include <cassert>
#include <cmath>
+#include <cstring>
#include "gromacs/gmxpreprocess/gpp_atomtype.h"
#include "gromacs/gmxpreprocess/topio.h"
#include "fflibutil.h"
-#include <string.h>
+#include <cstring>
#include <string>
#include <vector>
#include "gen_ad.h"
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cctype>
#include <cmath>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "gen_vsite.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/fileio/pdbio.h"
#include "gromacs/gmxpreprocess/add_par.h"
#include "genhydro.h"
-#include <string.h>
-#include <time.h>
+#include <cstring>
+#include <ctime>
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
#include "gmxcpp.h"
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cctype>
+#include <cerrno>
+#include <climits>
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
gmx_chdir(handle->cwd);
}
- if (0)
- {
- switch (errno)
- {
- case 0:
- break;
- case ENOENT:
- return eCPP_FILE_NOT_FOUND;
- case EBADF:
- return eCPP_FILE_NOT_OPEN;
- case EINTR:
- return eCPP_INTERRUPT;
- default:
- return eCPP_UNKNOWN;
- }
- }
handle->fp = nullptr;
handle->line_nr = 0;
if (nullptr != handle->fn)
#include "gpp_atomtype.h"
-#include <string.h>
-
#include <climits>
#include <cmath>
+#include <cstring>
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/gmxpreprocess/topdirs.h"
return ga->nb[nt].c[param];
}
-gpp_atomtype_t init_atomtype(void)
+gpp_atomtype_t init_atomtype()
{
gpp_atomtype_t ga;
real get_atomtype_nbparam(int nt, int param, gpp_atomtype_t at);
/* Similar to the previous but returns the paramth parameter or NOTSET */
-gpp_atomtype_t init_atomtype(void);
+gpp_atomtype_t init_atomtype();
/* Return a new atomtype structure */
void done_atomtype(gpp_atomtype_t at);
#include "gpp_bond_atomtype.h"
-#include <string.h>
+#include <cstring>
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/topology/symtab.h"
return *(ga->atomname[nt]);
}
-t_bond_atomtype init_bond_atomtype(void)
+t_bond_atomtype init_bond_atomtype()
{
gpp_bond_atomtype *ga;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2011,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2011,2014,2015,2018, 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.
char *get_bond_atomtype_name(int nt, t_bond_atomtype at);
/* Return name corresponding to atomtype nt, or NULL if not found */
-t_bond_atomtype init_bond_atomtype(void);
+t_bond_atomtype init_bond_atomtype();
/* Return a new atomtype structure */
void done_bond_atomtype(t_bond_atomtype *at);
#include "gpp_nextnb.h"
-#include <stdlib.h>
+#include <cstdlib>
#include "gromacs/gmxpreprocess/toputil.h"
#include "gromacs/topology/ifunc.h"
#include "grompp.h"
-#include <errno.h>
-#include <limits.h>
-#include <string.h>
-
+#include <cerrno>
+#include <climits>
#include <cmath>
+#include <cstring>
#include <algorithm>
#include "h_db.h"
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/gmxpreprocess/fflibutil.h"
#include "gromacs/gmxpreprocess/notset.h"
#include "hackblock.h"
-#include <string.h>
+#include <cstring>
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/math/vec.h"
#include "hizzie.h"
-#include <stdio.h>
-#include <string.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstring>
#include "gromacs/fileio/pdbio.h"
#include "gromacs/gmxpreprocess/pdb2top.h"
#include "nm2type.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
#include "pdb2gmx.h"
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
#include <algorithm>
#include "pdb2top.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-
+#include <cctype>
#include <cmath>
+#include <cstdio>
+#include <cstring>
#include <algorithm>
#include <string>
#include "pgutil.h"
-#include <string.h>
+#include <cstring>
#include "gromacs/topology/atoms.h"
#include "gromacs/utility/cstringutil.h"
#include "readir.h"
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-
+#include <cctype>
+#include <climits>
#include <cmath>
+#include <cstdlib>
#include <algorithm>
#include <string>
*/
#include "gmxpre.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/domdec/localatomsetmanager.h"
#include "gromacs/fileio/readinp.h"
#include "resall.h"
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "solvate.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
#include <vector>
#include "specbond.h"
-#include <ctype.h>
-#include <string.h>
-
+#include <cctype>
#include <cmath>
+#include <cstring>
#include <algorithm>
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/strdb.h"
-bool yesno(void)
+bool yesno()
{
char c;
int mk_specbonds(t_atoms *pdba, rvec x[], bool bInteractive,
t_ssbond **specbonds, bool bVerbose);
-bool yesno(void);
+bool yesno();
#endif
#include "ter_db.h"
-#include <ctype.h>
-#include <string.h>
+#include <cctype>
+#include <cstring>
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/gmxpreprocess/fflibutil.h"
#include "tomorse.h"
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cctype>
#include <cmath>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/gmxpreprocess/gpp_atomtype.h"
#include "gromacs/gmxpreprocess/grompp-impl.h"
#include "topdirs.h"
-#include <stdarg.h>
-#include <stdio.h>
+#include <cstdarg>
+#include <cstdio>
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "topio.h"
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include <cassert>
+#include <cctype>
+#include <cerrno>
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "toppush.h"
-#include <ctype.h>
-#include <stdlib.h>
-
+#include <cctype>
#include <cmath>
+#include <cstdlib>
#include <cstring>
#include <algorithm>
#include "topshake.h"
-#include <ctype.h>
-
+#include <cctype>
#include <cmath>
#include "gromacs/gmxpreprocess/notset.h"
#include "toputil.h"
-#include <string.h>
-
#include <climits>
#include <cmath>
+#include <cstring>
#include <algorithm>
#include "vsite_parm.h"
-#include <stdio.h>
-#include <string.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstring>
#include <algorithm>
#include "xlate.h"
-#include <ctype.h>
-#include <string.h>
+#include <cctype>
+#include <cstring>
#include "gromacs/gmxpreprocess/fflibutil.h"
#include "gromacs/gmxpreprocess/hackblock.h"
#include "config.h"
-#include <errno.h>
-#include <string.h>
+#include <cerrno>
+#include <cstring>
#if GMX_NATIVE_WINDOWS
#include <windows.h>
#include "config.h"
-#include <errno.h>
-#include <string.h>
+#include <cerrno>
+#include <cstring>
#include "gromacs/imd/imd.h"
#include "gromacs/utility/fatalerror.h"
/* On UNIX, we can use nice errors from errno.h */
#include <unistd.h>
#ifdef GMX_IMD
-#include <time.h>
+#include <ctime>
#include <sys/select.h>
#include <sys/time.h>
#include "listed-forces.h"
-#include <assert.h>
+#include <cassert>
#include <algorithm>
#include "config.h"
-#include <assert.h>
-#include <limits.h>
-#include <stdlib.h>
+#include <cassert>
+#include <climits>
+#include <cstdlib>
#include <algorithm>
#include "position-restraints.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include "gromacs/gmxlib/nrnb.h"
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010,2014,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2016,2017,2018, 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 "3dtransforms.h"
-#include <stdio.h>
-
#include <cmath>
+#include <cstdio>
#include "gromacs/math/vec.h"
#include "gromacs/utility/fatalerror.h"
#include "do_fit.h"
-#include <stdio.h>
-
#include <cmath>
+#include <cstdio>
#include "gromacs/linearalgebra/nrjac.h"
#include "gromacs/math/functions.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2014,2015,2017,2018, 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 "units.h"
-#include <stdio.h>
+#include <cstdio>
#include "gromacs/utility/cstringutil.h"
#include "config.h"
-#include <assert.h>
-#include <limits.h>
-
+#include <cassert>
+#include <climits>
#include <cmath>
#include <algorithm>
#include "broadcaststructs.h"
-#include <string.h>
+#include <cstring>
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/vec.h"
#include "calc_verletbuf.h"
-#include <assert.h>
-#include <stdlib.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdlib>
#include <algorithm>
#include "calcmu.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/units.h"
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2017,2018, 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 "compute_io.h"
-#include <signal.h>
-#include <stdlib.h>
+#include <csignal>
+#include <cstdlib>
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "constr.h"
-#include <assert.h>
-#include <stdlib.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdlib>
#include <algorithm>
*/
#include "gmxpre.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include <algorithm>
#include "ebin.h"
-#include <string.h>
-
#include <cmath>
+#include <cstring>
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
-t_ebin *mk_ebin(void)
+t_ebin *mk_ebin()
{
t_ebin *eb;
eprNORMAL, eprAVER, eprRMS, eprNR
};
-t_ebin *mk_ebin(void);
+t_ebin *mk_ebin();
/* Create an energy bin */
//! Empty the contents of \c eb.
#include "expanded.h"
-#include <stdio.h>
-
#include <cmath>
+#include <cstdio>
#include <algorithm>
#include "config.h"
-#include <assert.h>
-#include <string.h>
-
+#include <cassert>
#include <cmath>
+#include <cstring>
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
#include "config.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "nbnxn_gpu_jit_support.h"
-t_forcerec *mk_forcerec(void)
+t_forcerec *mk_forcerec()
{
t_forcerec *fr;
}
/*! \brief Create a new forcerec structure */
-t_forcerec *mk_forcerec(void);
+t_forcerec *mk_forcerec();
//! Destroy a forcerec.
void done_forcerec(t_forcerec *fr, int numMolBlocks, int numEnergyGroups);
#include "config.h"
-#include <assert.h>
-#include <stdlib.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdlib>
#include <algorithm>
#include <vector>
#include "mdebin.h"
-#include <float.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cfloat>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/awh/awh.h"
#include "gromacs/fileio/enxio.h"
#include "mdebin_bar.h"
-#include <float.h>
-#include <string.h>
-
#include <cassert>
+#include <cfloat>
#include <cmath>
+#include <cstring>
#include "gromacs/compat/make_unique.h"
#include "gromacs/fileio/enxio.h"
#include "membed.h"
-#include <signal.h>
-#include <stdlib.h>
+#include <csignal>
+#include <cstdlib>
#include "gromacs/commandline/filenm.h"
#include "gromacs/fileio/readinp.h"
#include "nbnxn_atomdata.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#endif
else
{
- nbat->bUseTreeReduce = 0;
+ nbat->bUseTreeReduce = false;
}
if (nbat->bUseTreeReduce)
{
#include "nbnxn_grid.h"
-#include <string.h>
-
#include <cmath>
+#include <cstring>
#include <algorithm>
#include "config.h"
-#include <assert.h>
-
+#include <cassert>
#include <cmath>
#include <algorithm>
#include "config.h"
-#include <assert.h>
-#include <string.h>
-
+#include <cassert>
#include <cmath>
+#include <cstring>
#include <algorithm>
#include "nbnxn_tuning.h"
-#include <assert.h>
-#include <stdlib.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdlib>
#include <algorithm>
#include <string>
#include "ns.h"
-#include <stdlib.h>
-#include <string.h>
-
#include <cmath>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "nsgrid.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
#include <algorithm>
#include "qm_orca.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
#include "config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
{
gmx_incons("Compiled without QMMM");
}
-t_QMMMrec *mk_QMMMrec(void)
+t_QMMMrec *mk_QMMMrec()
{
return nullptr;
}
void atomic_number(int nr, char ***atomtype, int *nucnum);
-t_QMMMrec *mk_QMMMrec(void);
+t_QMMMrec *mk_QMMMrec();
/* allocates memory for QMMMrec */
#if !GMX_QMMM
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/smalloc.h"
-t_bin *mk_bin(void)
+t_bin *mk_bin()
{
t_bin *b;
double *rbuf;
} t_bin;
-t_bin *mk_bin(void);
+t_bin *mk_bin();
/* Create a real bin */
void destroy_bin(t_bin *b);
#include "settle.h"
-#include <assert.h>
-#include <stdio.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdio>
#include <algorithm>
#include "shellfc.h"
-#include <stdlib.h>
-#include <string.h>
-
#include <cmath>
#include <cstdint>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include <array>
#endif
}
-void signal_handler_install(void)
+void signal_handler_install()
{
if (getenv("GMX_NO_TERM") == nullptr)
{
#endif
}
-gmx_stop_cond_t gmx_get_stop_condition(void)
+gmx_stop_cond_t gmx_get_stop_condition()
{
return static_cast<gmx_stop_cond_t>(stop_condition);
}
}
}
-const char *gmx_get_signal_name(void)
+const char *gmx_get_signal_name()
{
return gmx_signal_name[last_signal_name];
}
-gmx_bool gmx_got_usr_signal(void)
+gmx_bool gmx_got_usr_signal()
{
#if HAVE_SIGUSR1
gmx_bool ret = static_cast<gmx_bool>(usr_condition);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2015,2018, 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.
/* the externally visible functions: */
/* install the signal handlers that can set the stop condition. */
-void signal_handler_install(void);
+void signal_handler_install();
/* get the current stop condition */
-gmx_stop_cond_t gmx_get_stop_condition(void);
+gmx_stop_cond_t gmx_get_stop_condition();
/* set the stop condition upon receiving a remote one */
void gmx_set_stop_condition(gmx_stop_cond_t recvd_stop_cond);
/* get the signal name that lead to the current stop condition. */
-const char *gmx_get_signal_name(void);
+const char *gmx_get_signal_name();
/* check whether we received a USR1 signal.
The condition is reset once a TRUE value is returned, so this function
only returns TRUE once for a single signal. */
-gmx_bool gmx_got_usr_signal(void);
+gmx_bool gmx_got_usr_signal();
#endif
#include "config.h"
-#include <stdio.h>
-#include <string.h>
-
#include <cmath>
#include <cstdint>
+#include <cstdio>
+#include <cstring>
#include <array>
*/
#include "gmxpre.h"
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
#include "update.h"
-#include <stdio.h>
-
#include <cmath>
+#include <cstdio>
#include <algorithm>
#include "vsite.h"
-#include <stdio.h>
+#include <cstdio>
#include <algorithm>
#include <vector>
#include "wall.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
/* This file is completely threadsafe - keep it that way! */
#include "gmxpre.h"
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
#include <algorithm>
#include "config.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
#include <algorithm>
#include <memory>
#include "handlerestart.h"
-#include <string.h>
+#include <cstring>
#include "gromacs/commandline/filenm.h"
#include "gromacs/fileio/checkpoint.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018, 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.
int i;
dfhist->nlambda = nlambda;
- dfhist->bEquil = 0;
+ dfhist->bEquil = false;
dfhist->wl_delta = 0;
if (nlambda > 0)
sfree(dfhist->accum_m2[i]);
}
}
- dfhist->bEquil = 0;
+ dfhist->bEquil = false;
dfhist->nlambda = 0;
dfhist->wl_delta = 0;
}
#include "mshift.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
* The index consists of NCUCEDGE pairs of vertex indices.
* The index does not change, so it needs to be retrieved only once.
*/
-int *compact_unitcell_edges(void);
+int *compact_unitcell_edges();
/*! \brief Put atoms inside the simulations box
*
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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 "rmpbc.h"
-#include <stdlib.h>
-
#include <cmath>
+#include <cstdlib>
#include <algorithm>
#include "config.h"
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "config.h"
-#include <assert.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cstdlib>
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
#include "compiler.h"
-#include <stdarg.h>
-
#include <cmath>
+#include <cstdarg>
#include <algorithm>
#include "evaluate.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
#include "mempool.h"
-#include <stdlib.h>
+#include <cstdlib>
#include <new>
int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, YYLTYPE *pushed_loc, void *scanner);
-_gmx_sel_yypstate * _gmx_sel_yypstate_new (void);
+_gmx_sel_yypstate * _gmx_sel_yypstate_new ();
void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps);
#endif /* !YY__GMX_SEL_YY_PARSER_H_INCLUDED */
+--- parser.h 2018-08-12 14:27:05.680844826 -0700
++++ parser.h 2018-08-12 14:23:36.936847674 -0700
+@@ -177,7 +177,7 @@
+
+ int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, YYLTYPE *pushed_loc, void *scanner);
+
+-_gmx_sel_yypstate * _gmx_sel_yypstate_new (void);
++_gmx_sel_yypstate * _gmx_sel_yypstate_new ();
+ void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps);
+
+ #endif /* !YY__GMX_SEL_YY_PARSER_H_INCLUDED */
--- parser.cpp 2014-11-03 06:56:28.000000000 +0200
+++ parser.cpp 2014-11-03 06:57:35.000000000 +0200
@@ -437,7 +437,7 @@
#include "parsetree.h"
-#include <stdarg.h>
-#include <stdio.h>
+#include <cstdarg>
+#include <cstdio>
#include <exception>
#include "poscalc.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
#include <vector>
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2017,2018, 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 "position.h"
-#include <string.h>
+#include <cstring>
#include "gromacs/math/vec.h"
#include "gromacs/selection/indexutil.h"
echo Generating parser.cpp and parser.h... && \
$BISON -t -o parser.cpp --defines=parser.h parser.y && \
patch -p0 < parser.patch && \
- rm -f parser.cpp.orig
+ rm -f parser.cpp.orig parser.h.orig
[[ $FORCE || scanner.l -nt scanner.cpp ]] && \
echo Generating scanner.cpp and scanner_flex.h... && \
$FLEX -o scanner.cpp scanner.l && \
#include "scanner_internal.h"
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include <string>
#include "selmethod.h"
-#include <ctype.h>
-#include <stdarg.h>
+#include <cctype>
+#include <cstdarg>
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
*/
#include "gmxpre.h"
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/exceptions.h"
#include "swapcoords.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
+#include <cstdio>
+#include <cstdlib>
+#include <ctime>
#include <string>
#include <vector>
#include "config.h"
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include <string>
#include "config.h"
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
}
#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)) && \
(defined(__i386__) || defined(__x86_64__)) && !defined(_CRAYC))
-static __inline__ gmx_cycles_t gmx_cycles_read(void)
+static __inline__ gmx_cycles_t gmx_cycles_read()
{
/* x86 with GCC inline assembly - pentium TSC register */
unsigned low, high;
}
#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__) || defined(_CRAYC)) && \
(defined(__i386__) || defined(__x86_64__)))
-static __inline__ bool gmx_cycles_have_counter(void)
+static __inline__ bool gmx_cycles_have_counter()
{
/* x86 or x86-64 with GCC inline assembly - pentium TSC register */
- return 1;
+ return true;
}
#elif ((defined __aarch64__) && (defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)))
static __inline bool gmx_cycles_have_counter(void)
"PME gather",
};
-gmx_bool wallcycle_have_counter(void)
+gmx_bool wallcycle_have_counter()
{
return gmx_cycles_have_counter();
}
ewcsNR
};
-gmx_bool wallcycle_have_counter(void);
+gmx_bool wallcycle_have_counter();
/* Returns if cycle counting is supported */
gmx_wallcycle_t wallcycle_init(FILE *fplog, int resetstep, struct t_commrec *cr);
#include "atomprop.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-
+#include <cctype>
#include <cmath>
+#include <cstdio>
+#include <cstring>
#include "gromacs/math/utilities.h"
#include "gromacs/topology/residuetypes.h"
block->a = nullptr;
}
-t_blocka *new_blocka(void)
+t_blocka *new_blocka()
{
t_blocka *block;
void init_block(t_block *block);
void init_blocka(t_blocka *block);
-t_blocka *new_blocka(void);
+t_blocka *new_blocka();
/* allocate new block */
void done_block(t_block *block);
#include "index.h"
-#include <assert.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include "mtop_util.h"
-#include <limits.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <climits>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include "gromacs/math/vectypes.h"
#include "gromacs/topology/atoms.h"
#include "symtab.h"
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
#include <algorithm>
gmx_fatal(FARGS, "symtab get_symtab_handle %d not found", name);
}
-static t_symbuf *new_symbuf(void)
+static t_symbuf *new_symbuf()
{
t_symbuf *symbuf;
#include "topsort.h"
-#include <stdio.h>
+#include <cstdio>
#include "gromacs/topology/ifunc.h"
#include "gromacs/topology/topology.h"
#include "surfacearea.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <algorithm>
#include <vector>
#include "runnercommon.h"
-#include <string.h>
+#include <cstring>
#include <algorithm>
#include <string>
return hash_int;
}
-int gmx_physicalnode_id_hash(void)
+int gmx_physicalnode_id_hash()
{
int hash = 0;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2018, 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.
*
* \ingroup module_utility
*/
-const char *gmx_version(void);
+const char *gmx_version();
/*! \brief
* Full git hash of the latest commit.
*
*
* \ingroup module_utility
*/
-const char *gmx_version_git_full_hash(void);
+const char *gmx_version_git_full_hash();
/*! \brief
* Full git hash of the latest commit in a central \Gromacs repository.
*
*
* \ingroup module_utility
*/
-const char *gmx_version_git_central_base_hash(void);
+const char *gmx_version_git_central_base_hash();
/*! \brief
* Defined if ``libgromacs`` has been compiled in double precision.
inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b)
{
int i;
- bool r = 1;
+ bool r = true;
for (i = 0; i < BITMASK_ALEN; i++)
{
r = r && !(a[i] & b[i]);
inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b)
{
int i;
- bool r = 1;
+ bool r = true;
for (i = 0; i < BITMASK_ALEN; i++)
{
r = r && (a[i] == b[i]);
inline static bool bitmask_is_zero(gmx_bitmask_t m)
{
int i;
- bool r = 1;
+ bool r = true;
for (i = 0; i < BITMASK_ALEN; i++)
{
r = r && !m[i];
gmx_bool cmp_bool(FILE *fp, const char *s, int index, gmx_bool b1, gmx_bool b2)
{
- if (b1)
- {
- b1 = 1;
- }
- else
- {
- b1 = 0;
- }
- if (b2)
- {
- b2 = 1;
- }
- else
- {
- b2 = 0;
- }
if (b1 != b2)
{
if (index != -1)
{
//! Whether printing of cool quotes is enabled
-bool beCool(void)
+bool beCool()
{
/* Yes, it is bad to check the environment variable every call,
* but we dont call this routine often, and it avoids using
#include "cstringutil.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include <cassert>
#include <cctype>
+#include <cstdio>
+#include <cstdlib>
#include <cstring>
#include <string>
#include "config.h"
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <fcntl.h>
#include <sys/stat.h>
} // namespace gmx
-void gmx_disable_file_buffering(void)
+void gmx_disable_file_buffering()
{
bUnbuffered = true;
}
*
* This only has effect on files opened with gmx_ffopen().
*/
-void gmx_disable_file_buffering(void);
+void gmx_disable_file_buffering();
/*! \brief
* Enables backups with the specified number of maximum backups.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2016,2017,2018, 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 "config.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#if GMX_OPENMP
#include <omp.h>
#include "config.h"
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
#ifdef WITH_DMALLOC
#include <dmalloc.h>
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018, 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.
// TODO: There may be a better way of doing this on Windows, Microsoft
// provides their own way of doing things...
- while (1)
+ while (true)
{
va_copy(ap_copy, ap);
int n = vsnprintf(buf, length, fmt, ap_copy);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, 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 "config.h"
-#include <string.h>
-#include <time.h>
+#include <cstring>
+#include <ctime>
#include <sys/types.h>
#ifdef HAVE_SYS_TIME_H
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2017,2018, 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.
*
* Does not throw.
*/
-int gmx_getpid(void);
+int gmx_getpid();
/*! \brief
* Returns the current user ID, or -1 if not available.
*
* Does not throw.
*/
-int gmx_getuid(void);
+int gmx_getuid();
/*! \brief
* Gets the current user name, if available.
*