*
* 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.
base = 0;
symbuf = symtab->symbuf;
- while (symbuf != NULL)
+ while (symbuf != nullptr)
{
const int index = name-symbuf->buf;
if ( ( index >= 0 ) && ( index < symbuf->bufsize ) )
t_symbuf *symbuf;
symbuf = symtab->symbuf;
- while (symbuf != NULL)
+ while (symbuf != nullptr)
{
if (name < symbuf->bufsize)
{
}
}
gmx_fatal(FARGS, "symtab get_symtab_handle %d not found", name);
- return NULL;
+ return nullptr;
}
static t_symbuf *new_symbuf(void)
snew(symbuf, 1);
symbuf->bufsize = TABLESIZE;
snew(symbuf->buf, symbuf->bufsize);
- symbuf->next = NULL;
+ symbuf->next = nullptr;
return symbuf;
}
t_symbuf *symbuf;
gmx_bool bCont;
- if (symtab->symbuf == NULL)
+ if (symtab->symbuf == nullptr)
{
symtab->symbuf = new_symbuf();
}
{
for (i = 0; (i < symbuf->bufsize); i++)
{
- if (symbuf->buf[i] == NULL)
+ if (symbuf->buf[i] == nullptr)
{
symtab->nr++;
symbuf->buf[i] = gmx_strdup(name);
return &(symbuf->buf[i]);
}
}
- if (symbuf->next != NULL)
+ if (symbuf->next != nullptr)
{
symbuf = symbuf->next;
bCont = TRUE;
void open_symtab(t_symtab *symtab)
{
symtab->nr = 0;
- symtab->symbuf = NULL;
+ symtab->symbuf = nullptr;
}
void close_symtab(t_symtab gmx_unused *symtab)
close_symtab(symtab);
symbuf = symtab->symbuf;
- while (symbuf != NULL)
+ while (symbuf != nullptr)
{
for (i = 0; (i < symbuf->bufsize) && (i < symtab->nr); i++)
{
symbuf = symbuf->next;
sfree(freeptr);
}
- symtab->symbuf = NULL;
+ symtab->symbuf = nullptr;
if (symtab->nr != 0)
{
gmx_incons("Freeing symbol table (symtab) structure");
close_symtab(symtab);
symbuf = symtab->symbuf;
- while (symbuf != NULL)
+ while (symbuf != nullptr)
{
symtab->nr -= std::min(symbuf->bufsize, symtab->nr);
freeptr = symbuf;
symbuf = symbuf->next;
sfree(freeptr);
}
- symtab->symbuf = NULL;
+ symtab->symbuf = nullptr;
if (symtab->nr != 0)
{
gmx_incons("Freeing symbol table (symtab) structure");
i = 0;
nr = symtab->nr;
symbuf = symtab->symbuf;
- while (symbuf != NULL)
+ while (symbuf != nullptr)
{
for (j = 0; (j < symbuf->bufsize) && (j < nr); j++)
{