Uncrustify maxscale

See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
This commit is contained in:
Niclas Antti
2018-09-09 22:26:19 +03:00
parent fa7ec95069
commit c447e5cf15
849 changed files with 35002 additions and 27238 deletions

View File

@ -40,11 +40,17 @@ bool INIReader::GetBoolean(string section, string name, bool default_value)
// Convert to lower case to make string comparisons case-insensitive
std::transform(valstr.begin(), valstr.end(), valstr.begin(), ::tolower);
if (valstr == "true" || valstr == "yes" || valstr == "on" || valstr == "1")
{
return true;
}
else if (valstr == "false" || valstr == "no" || valstr == "off" || valstr == "0")
{
return false;
}
else
{
return default_value;
}
}
string INIReader::MakeKey(string section, string name)
@ -55,13 +61,17 @@ string INIReader::MakeKey(string section, string name)
return key;
}
int INIReader::ValueHandler(void* user, const char* section, const char* name,
int INIReader::ValueHandler(void* user,
const char* section,
const char* name,
const char* value)
{
INIReader* reader = (INIReader*)user;
string key = MakeKey(section, name);
if (reader->_values[key].size() > 0)
{
reader->_values[key] += "\n";
}
reader->_values[key] += value;
return 1;
}