From 05c989e58aeffcfb59cebaca6797cb69dd25cb1e Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sat, 16 Jun 2012 14:33:30 +0000 Subject: another portion of "#ifdef Unicode" removal git-svn-id: http://svn.miranda-ng.org/main/trunk@446 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Variables/parse_inet.cpp | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'plugins/Variables/parse_inet.cpp') 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; -- cgit v1.2.3