diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-16 14:33:30 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-16 14:33:30 +0000 |
commit | 05c989e58aeffcfb59cebaca6797cb69dd25cb1e (patch) | |
tree | 460bde28df51ea7b01109b56818b5880ac47ba66 /plugins/Variables/parse_inet.cpp | |
parent | ac7bf920f219a7aed7eb163c8b3195e66c12e4da (diff) |
another portion of "#ifdef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@446 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/parse_inet.cpp')
-rw-r--r-- | plugins/Variables/parse_inet.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/plugins/Variables/parse_inet.cpp b/plugins/Variables/parse_inet.cpp index cf8f24524f..9d97b5d1f7 100644 --- a/plugins/Variables/parse_inet.cpp +++ b/plugins/Variables/parse_inet.cpp @@ -52,11 +52,9 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai) { strncpy(res+cur, hex, strlen(hex));
cur+=strlen(hex);
}
-#ifdef UNICODE
+
tres = a2u(res);
-#else
- tres = _strdup(res);
-#endif
+
free(res);
return tres;
@@ -71,11 +69,9 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai) { if (ai->argc != 2) {
return NULL;
}
-#ifdef UNICODE
+
res = u2a(ai->targv[1]);
-#else
- res = _strdup(ai->argv[1]);
-#endif
+
if (res == NULL) {
return NULL;
}
@@ -90,11 +86,9 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai) { cur++;
}
res = ( char* )realloc(res, strlen(res)+1);
-#ifdef UNICODE
+
tres = a2u(res);
-#else
- tres = _strdup(res);
-#endif
+
free(res);
return tres;
@@ -112,11 +106,9 @@ static TCHAR *parseNToA(ARGUMENTSINFO *ai) { in.s_addr = ttoi(ai->targv[1]);
res = inet_ntoa(in);
if (res != NULL) {
-#ifdef UNICODE
+
return a2u(res);
-#else
- return _strdup(res);
-#endif
+
}
return NULL;
@@ -134,11 +126,9 @@ static TCHAR *parseHToA(ARGUMENTSINFO *ai) { in.s_addr = htonl(ttoi(ai->targv[1]));
res = inet_ntoa(in);
if (res != NULL) {
-#ifdef UNICODE
+
return a2u(res);
-#else
- return _strdup(res);
-#endif
+
}
return NULL;
|