summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_libstr.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-07 13:25:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-07 13:25:07 +0300
commite6edc1ba036f66f07878779d4d7a973c80d30efb (patch)
treec310656e2e9aaa4811e264ef2f811e79b5f582e4 /protocols/MSN/src/msn_libstr.cpp
parenta9fbe9a81a6777b4b358d93116ee15f9f07dfb6e (diff)
hopefully last custom UrlDecode implementation removed
Diffstat (limited to 'protocols/MSN/src/msn_libstr.cpp')
-rw-r--r--protocols/MSN/src/msn_libstr.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/protocols/MSN/src/msn_libstr.cpp b/protocols/MSN/src/msn_libstr.cpp
index 77890a1075..ef2413f11a 100644
--- a/protocols/MSN/src/msn_libstr.cpp
+++ b/protocols/MSN/src/msn_libstr.cpp
@@ -107,42 +107,6 @@ void parseWLID(char* wlid, char** net, char** email, char** inst)
*inst = nullptr;
}
-/////////////////////////////////////////////////////////////////////////////////////////
-// UrlDecode - converts URL chars like %20 into printable characters
-
-static int SingleHexToDecimal(char c)
-{
- if (c >= '0' && c <= '9') return c - '0';
- if (c >= 'a' && c <= 'f') return c - 'a' + 10;
- if (c >= 'A' && c <= 'F') return c - 'A' + 10;
- return -1;
-}
-
-template void UrlDecode(char* str);
-template void UrlDecode(wchar_t* str);
-
-template <class chartype> void UrlDecode(chartype* str)
-{
- chartype* s = str, *d = str;
-
- while (*s) {
- if (*s == '%') {
- int digit1 = SingleHexToDecimal(s[1]);
- if (digit1 != -1) {
- int digit2 = SingleHexToDecimal(s[2]);
- if (digit2 != -1) {
- s += 3;
- *d++ = (char)((digit1 << 4) | digit2);
- continue;
- }
- }
- }
- *d++ = *s++;
- }
-
- *d = 0;
-}
-
void HtmlDecode(char *str)
{
if (str == nullptr)