implemented advanced search history feature

This commit is contained in:
Jean-Francois Dockes
2012-10-16 13:37:56 +02:00
parent 9ccb862666
commit 816980a1c4
20 changed files with 736 additions and 97 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ bool base64_decode(const string& in, string& out)
{
int io = 0, state = 0, ch = 0;
unsigned int ii = 0;
out.erase();
out.clear();
size_t ilen = in.length();
out.reserve(ilen);
@@ -217,7 +217,7 @@ void base64_encode(const string &in, string &out)
unsigned char input[3];
unsigned char output[4];
out.erase();
out.clear();
int srclength = in.length();
int sidx = 0;
+13
View File
@@ -20,5 +20,18 @@
void base64_encode(const std::string& in, std::string& out);
bool base64_decode(const std::string& in, std::string& out);
inline std::string base64_encode(const std::string& in)
{
std::string o;
base64_encode(in, o);
return o;
}
inline std::string base64_decode(const std::string& in)
{
std::string o;
if (base64_decode(in, o))
return o;
return std::string();
}
#endif /* _BASE64_H_INCLUDED_ */