* \ingroup module_selection
* \endcond
*/
+#include "gmxpre.h"
+
+#include "scanner_internal.h"
+
#include <stdlib.h>
#include <string.h>
#include <string>
-#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/string2.h"
-
+#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/messagestringcollector.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/stringutil.h"
+#include "parser.h"
#include "parsetree.h"
+#include "scanner.h"
#include "selectioncollection-impl.h"
#include "selelem.h"
#include "selmethod.h"
#include "symrec.h"
-#include "parser.h"
-#include "scanner.h"
-#include "scanner_internal.h"
-
/*! \brief
* Step in which the allocated memory for pretty-printed input is incremented.
*/
}
else
{
- yylval->str = param->name ? strdup(param->name) : NULL;
+ yylval->str = param->name ? gmx_strdup(param->name) : NULL;
}
return PARAM;
}
GMX_THROW(gmx::InternalError("Unsupported variable type"));
return INVALID;
}
- delete yylval->sel;
- return INVALID; /* Should not be reached. */
+ /* This position should not be reached. */
}
/* For method symbols, return the correct type */
if (symtype == gmx::SelectionParserSymbol::MethodSymbol)
if (symtype == gmx::SelectionParserSymbol::PositionSymbol)
{
state->bMatchOf = true;
- yylval->str = strdup(symbol->name().c_str());
+ yylval->str = gmx_strdup(symbol->name().c_str());
state->prev_pos_kw = 2;
return KEYWORD_POS;
}