I18N - color.cpp

- Localized color.cpp, fingers ache.
- Made a couple of parse.cpp functions non-static.
This commit is contained in:
Paul Beckingham
2009-06-06 23:31:04 -04:00
parent db52cf7327
commit 7965bd5b4f
6 changed files with 155 additions and 121 deletions

View File

@@ -302,6 +302,18 @@ static bool validId (const std::string& input)
////////////////////////////////////////////////////////////////////////////////
// 1,2-4,6
bool validSequence (
const std::string& input,
Sequence& sequence)
{
bool valid = true;
try { sequence.parse (input); }
catch (...) { valid = false; }
return valid;
}
static bool validSequence (
const std::string& input,
std::vector <int>& ids)
@@ -363,14 +375,15 @@ static bool validTag (const std::string& input)
}
////////////////////////////////////////////////////////////////////////////////
static bool validDescription (const std::string& input)
bool validDescription (const std::string& input)
{
if (input.length () == 0) return false;
if (input.find ("\r") != std::string::npos) return false;
if (input.find ("\f") != std::string::npos) return false;
if (input.find ("\n") != std::string::npos) return false;
if (input.length () &&
input.find ("\r") == std::string::npos &&
input.find ("\f") == std::string::npos &&
input.find ("\n") == std::string::npos)
return true;
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////