Merge branch '0.4.x' into 0.5.0.x

Conflicts:
	src/util.cpp
This commit is contained in:
Luke Dashjr
2012-01-03 12:19:48 -05:00
5 changed files with 117 additions and 68 deletions

View File

@@ -469,6 +469,23 @@ void ParseParameters(int argc, char* argv[])
}
}
bool SoftSetArg(const std::string& strArg, const std::string& strValue)
{
if (mapArgs.count(strArg))
return false;
mapArgs[strArg] = strValue;
return true;
}
bool SoftSetArg(const std::string& strArg, bool fValue)
{
if (fValue)
return SoftSetArg(strArg, std::string("1"));
else
return SoftSetArg(strArg, std::string("0"));
}
string EncodeBase64(const unsigned char* pch, size_t len)
{
static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";