}
}
+ bool wordchar(char ch)
+ {
+ return isalnum(ch)
+ || ch == '-'
+ || ch == '.'
+ || ch == '_';
+ }
+
void nextword(std::string& rv)
{
int ch = next();
while (isspace(ch))
ch = next();
- while (isalnum(ch) || ch == '_'|| ch == '-')
+ while (wordchar(ch))
{
rv.push_back(ch);
ch = next();
while (1)
{
ch = next();
- if (isalnum(ch) || (varname.empty() && ch == '#') || ch == '.')
+ if (wordchar(ch) || (varname.empty() && ch == '#'))
varname.push_back(ch);
else if (ch == ';')
break;
if (!FileSystem::GetFileList(includedir, files, "*.conf"))
throw CoreException("Unable to read directory for include: " + includedir);
- std::sort(files.begin(), files.end());
+ std::sort(files.begin(), files.end());
for (std::vector<std::string>::const_iterator iter = files.begin(); iter != files.end(); ++iter)
{
const std::string path = includedir + '/' + *iter;