#include <stdlib.h>
#include <cmath>
+#include <cstring>
#include <algorithm>
return;
}
- ft = strtol(alc[nral], NULL, 10);
+ ft = strtol(alc[nral], nullptr, 10);
ftype = ifunc_index(d, ft);
nrfp = NRFP(ftype);
nrfpA = interaction_function[ftype].nrfpA;
if (nn >= 3 && strlen(alc[2]) == 1 && isdigit(alc[2][0]))
{
nral = 2;
- ft = strtol(alc[nral], NULL, 10);
+ ft = strtol(alc[nral], nullptr, 10);
/* Move atom types around a bit and use 'X' for wildcard atoms
* to create a 4-atom dihedral definition with arbitrary atoms in
* position 1 and 4.
else if (nn == 5 && strlen(alc[4]) == 1 && isdigit(alc[4][0]))
{
nral = 4;
- ft = strtol(alc[nral], NULL, 10);
+ ft = strtol(alc[nral], nullptr, 10);
}
else
{
}
start += nchar_consumed;
- ft = strtol(alc[nral], NULL, 10);
- nxcmap = strtol(alc[nral+1], NULL, 10);
- nycmap = strtol(alc[nral+2], NULL, 10);
+ ft = strtol(alc[nral], nullptr, 10);
+ nxcmap = strtol(alc[nral+1], nullptr, 10);
+ nycmap = strtol(alc[nral+2], nullptr, 10);
/* Check for equal grid spacing in x and y dims */
if (nxcmap != nycmap)
ncmap = nxcmap*nycmap;
ftype = ifunc_index(d, ft);
- nrfpA = strtol(alc[6], NULL, 10)*strtol(alc[6], NULL, 10);
- nrfpB = strtol(alc[7], NULL, 10)*strtol(alc[7], NULL, 10);
+ nrfpA = strtol(alc[6], nullptr, 10)*strtol(alc[6], nullptr, 10);
+ nrfpB = strtol(alc[7], nullptr, 10)*strtol(alc[7], nullptr, 10);
nrfp = nrfpA+nrfpB;
/* Allocate memory for the CMAP grid */
}
nn = sscanf(line+start+sl, " %s ", s);
sl += strlen(s);
- bt[F_CMAP].cmap[i+(bt[F_CMAP].ncmap)-nrfp] = strtod(s, NULL);
+ bt[F_CMAP].cmap[i+(bt[F_CMAP].ncmap)-nrfp] = strtod(s, nullptr);
if (nn == 1)
{
warning_error_and_exit(wi, errbuf, FARGS);
}
}
- resnr = strtol(resnumberic, NULL, 10);
+ resnr = strtol(resnumberic, nullptr, 10);
if (nr > 0)
{
{
int i, j, ti, tj, ntype;
gmx_bool bFound;
- t_param *pi = NULL;
+ t_param *pi = nullptr;
int nr = bt[ftype].nr;
int nral = NRAL(ftype);
int nrfp = interaction_function[ftype].nrfpA;
{
int nparam_found;
gmx_bool bFound, bSame;
- t_param *pi = NULL;
- t_param *pj = NULL;
+ t_param *pi = nullptr;
+ t_param *pj = nullptr;
int nr = bt[ftype].nr;
int nral = NRAL(ftype);
int nrfpA = interaction_function[ftype].nrfpA;
{
char *ptr;
int type, ftype, j, n, ret, nj, a;
- int *atc = NULL;
- double *weight = NULL, weight_tot;
+ int *atc = nullptr;
+ double *weight = nullptr, weight_tot;
t_param param;
char errbuf[STRLEN];
snew(b2->a, b2->nr);
for (i = 0; (i < b2->nr); i++)
{
- b2->a[i] = NULL;
+ b2->a[i] = nullptr;
}
}
/* Empty the LJ14 pairlist */
plist[F_LJ14].nr = 0;
- plist[F_LJ14].param = NULL;
+ plist[F_LJ14].param = nullptr;
}
static void generate_LJCpairsNB(t_molinfo *mol, int nb_funct, t_params *nbp, warninp_t wi)