Legacy Checking

- The 'show' command now mentions use of any deprecated configuration
  variables.
This commit is contained in:
Paul Beckingham
2011-10-22 23:28:31 -04:00
parent dc3470a9a8
commit 0aa953dc4e
4 changed files with 46 additions and 8 deletions

View File

@@ -134,6 +134,39 @@ std::string legacyCheckForDeprecatedColor ()
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
std::string legacyCheckForDeprecatedVariables ()
{
std::vector <std::string> deprecated;
std::map <std::string, std::string>::const_iterator it;
for (it = context.config.begin (); it != context.config.end (); ++it)
{
// report.*.limit
if (it->first.substr (0, 7) == "report." &&
it->first.substr (it->first.length () - 6) == ".limit")
deprecated.push_back (it->first);
if (it->first == "echo.command" ||
it->first == "edit.verbose")
deprecated.push_back (it->first);
}
std::stringstream out;
if (deprecated.size ())
{
out << STRING_CONFIG_DEPRECATED_VAR
<< "\n";
std::vector <std::string>::iterator it2;
for (it2 = deprecated.begin (); it2 != deprecated.end (); ++it2)
out << " " << *it2 << "\n";
out << "\n";
}
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
std::string legacyCheckForDeprecatedColumns ()
{