summaryrefslogtreecommitdiff
path: root/plugins/Variables/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Variables/src')
-rw-r--r--plugins/Variables/src/contact.cpp6
-rw-r--r--plugins/Variables/src/contact.h88
-rw-r--r--plugins/Variables/src/help.cpp10
-rw-r--r--plugins/Variables/src/parse_alias.cpp4
-rw-r--r--plugins/Variables/src/parse_alias.h2
-rw-r--r--plugins/Variables/src/parse_external.cpp14
-rw-r--r--plugins/Variables/src/parse_external.h4
-rw-r--r--plugins/Variables/src/parse_inet.h8
-rw-r--r--plugins/Variables/src/parse_logic.cpp22
-rw-r--r--plugins/Variables/src/parse_logic.h32
-rw-r--r--plugins/Variables/src/parse_math.cpp4
-rw-r--r--plugins/Variables/src/parse_math.h22
-rw-r--r--plugins/Variables/src/parse_metacontacts.cpp12
-rw-r--r--plugins/Variables/src/parse_metacontacts.h6
-rw-r--r--plugins/Variables/src/parse_miranda.cpp30
-rw-r--r--plugins/Variables/src/parse_miranda.h52
-rw-r--r--plugins/Variables/src/parse_regexp.cpp4
-rw-r--r--plugins/Variables/src/parse_regexp.h4
-rw-r--r--plugins/Variables/src/parse_str.cpp38
-rw-r--r--plugins/Variables/src/parse_str.h74
-rw-r--r--plugins/Variables/src/parse_system.cpp40
-rw-r--r--plugins/Variables/src/parse_system.h40
-rw-r--r--plugins/Variables/src/parse_variables.cpp2
-rw-r--r--plugins/Variables/src/parse_variables.h6
-rw-r--r--plugins/Variables/src/stdafx.h4
-rw-r--r--plugins/Variables/src/tokenregister.cpp2
-rw-r--r--plugins/Variables/src/variables.cpp6
27 files changed, 268 insertions, 268 deletions
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index 88b93ea931..0ab768ffd4 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -199,7 +199,7 @@ MCONTACT getContactFromString(const TCHAR *tszContact, DWORD dwFlags, int nMatch
for (hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// <_HANDLE_:hContact>
- tmp.Format(_T("<%s:%d>"), _T(PROTOID_HANDLE), hContact);
+ tmp.Format(L"<%s:%d>", _T(PROTOID_HANDLE), hContact);
bool bMatch = (tmp == tszContact);
char *szProto = GetContactProto(hContact);
@@ -210,7 +210,7 @@ MCONTACT getContactFromString(const TCHAR *tszContact, DWORD dwFlags, int nMatch
if ((dwFlags & CI_PROTOID) && !bMatch) {
ptrT cInfo(getContactInfoT(CNF_UNIQUEID, hContact));
if (cInfo) {
- tmp.Format(_T("<%S:%s>"), szProto, cInfo);
+ tmp.Format(L"<%S:%s>", szProto, cInfo);
if (tmp == tszContact)
bMatch = true;
}
@@ -368,6 +368,6 @@ TCHAR* encodeContactToString(MCONTACT hContact)
size_t size = mir_tstrlen(tszUniqueId) + mir_strlen(szProto) + 4;
TCHAR *tszResult = (TCHAR *)mir_calloc(size * sizeof(TCHAR));
if (tszResult)
- mir_sntprintf(tszResult, size, _T("<%S:%s>"), szProto, tszUniqueId);
+ mir_sntprintf(tszResult, size, L"<%S:%s>", szProto, tszUniqueId);
return tszResult;
}
diff --git a/plugins/Variables/src/contact.h b/plugins/Variables/src/contact.h
index 3eacabbbee..55e292677c 100644
--- a/plugins/Variables/src/contact.h
+++ b/plugins/Variables/src/contact.h
@@ -17,52 +17,52 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define STR_FIRSTNAME _T("first")
-#define STR_LASTNAME _T("last")
-#define STR_NICK _T("nick")
-#define STR_CUSTOMNICK _T("cnick")
-#define STR_EMAIL _T("email")
-#define STR_CITY _T("city")
-#define STR_STATE _T("state")
-#define STR_COUNTRY _T("country")
-#define STR_PHONE _T("phone")
-#define STR_HOMEPAGE _T("homepage")
-#define STR_ABOUT _T("about")
-#define STR_GENDER _T("gender")
-#define STR_AGE _T("age")
-#define STR_FIRSTLAST _T("firstlast")
-#define STR_UNIQUEID _T("id")
-#define STR_DISPLAY _T("display")
+#define STR_FIRSTNAME L"first"
+#define STR_LASTNAME L"last"
+#define STR_NICK L"nick"
+#define STR_CUSTOMNICK L"cnick"
+#define STR_EMAIL L"email"
+#define STR_CITY L"city"
+#define STR_STATE L"state"
+#define STR_COUNTRY L"country"
+#define STR_PHONE L"phone"
+#define STR_HOMEPAGE L"homepage"
+#define STR_ABOUT L"about"
+#define STR_GENDER L"gender"
+#define STR_AGE L"age"
+#define STR_FIRSTLAST L"firstlast"
+#define STR_UNIQUEID L"id"
+#define STR_DISPLAY L"display"
-#define STR_FAX _T("fax")
-#define STR_CELLULAR _T("cellular")
-#define STR_TIMEZONE _T("timezone")
-#define STR_MYNOTES _T("mynotes")
-#define STR_BIRTHDAY _T("bday")
-#define STR_BIRTHMONTH _T("bmonth")
-#define STR_BIRTHYEAR _T("byear")
-#define STR_STREET _T("street")
-#define STR_ZIP _T("zip")
-#define STR_LANGUAGE1 _T("lang1")
-#define STR_LANGUAGE2 _T("lang2")
-#define STR_LANGUAGE3 _T("lang3")
-#define STR_CONAME _T("coname")
-#define STR_CODEPT _T("codept")
-#define STR_COPOSITION _T("copos")
-#define STR_COSTREET _T("costreet")
-#define STR_COCITY _T("cocity")
-#define STR_COSTATE _T("costate")
-#define STR_COZIP _T("cozip")
-#define STR_COCOUNTRY _T("cocountry")
-#define STR_COHOMEPAGE _T("cohomepage")
+#define STR_FAX L"fax"
+#define STR_CELLULAR L"cellular"
+#define STR_TIMEZONE L"timezone"
+#define STR_MYNOTES L"mynotes"
+#define STR_BIRTHDAY L"bday"
+#define STR_BIRTHMONTH L"bmonth"
+#define STR_BIRTHYEAR L"byear"
+#define STR_STREET L"street"
+#define STR_ZIP L"zip"
+#define STR_LANGUAGE1 L"lang1"
+#define STR_LANGUAGE2 L"lang2"
+#define STR_LANGUAGE3 L"lang3"
+#define STR_CONAME L"coname"
+#define STR_CODEPT L"codept"
+#define STR_COPOSITION L"copos"
+#define STR_COSTREET L"costreet"
+#define STR_COCITY L"cocity"
+#define STR_COSTATE L"costate"
+#define STR_COZIP L"cozip"
+#define STR_COCOUNTRY L"cocountry"
+#define STR_COHOMEPAGE L"cohomepage"
-#define STR_ACCOUNT _T("account")
-#define STR_PROTOCOL _T("protocol")
-#define STR_STATUS _T("status")
-#define STR_INTERNALIP _T("intip")
-#define STR_EXTERNALIP _T("extip")
-#define STR_GROUP _T("group")
-#define STR_PROTOID _T("protoid")
+#define STR_ACCOUNT L"account"
+#define STR_PROTOCOL L"protocol"
+#define STR_STATUS L"status"
+#define STR_INTERNALIP L"intip"
+#define STR_EXTERNALIP L"extip"
+#define STR_GROUP L"group"
+#define STR_PROTOID L"protoid"
#define CCNF_ACCOUNT 51 // CUSTOM, returns contact's account name (0.8.0+)
#define CCNF_PROTOCOL 50 // CUSTOM, returns the contact's protocol (human-readable)
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index 1adaed553a..842695deb3 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -302,12 +302,12 @@ static TCHAR *getTokenDescription(TOKENREGISTEREX *tr)
}
if (tr->flags&TRF_FIELD)
- mir_sntprintf(desc, len, _T("%c%s%c"), FIELD_CHAR, tr->szTokenString, FIELD_CHAR);
+ mir_sntprintf(desc, len, L"%c%s%c", FIELD_CHAR, tr->szTokenString, FIELD_CHAR);
else {
if (args != NULL)
tArgs = mir_a2t(args);
- mir_sntprintf(desc, len, _T("%c%s%s"), FUNC_CHAR, tr->tszTokenString, (tArgs!=NULL?tArgs:_T("")));
+ mir_sntprintf(desc, len, L"%c%s%s", FUNC_CHAR, tr->tszTokenString, (tArgs!=NULL?tArgs:L""));
}
mir_free(tArgs);
@@ -400,7 +400,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA
tszHelpDesc = getHelpDescription(tr);
if (tszHelpDesc == NULL)
- tszHelpDesc = mir_tstrdup(_T("unknown"));
+ tszHelpDesc = mir_tstrdup(L"unknown");
lvItem.iSubItem = 1;
lvItem.pszText = TranslateTS(tszHelpDesc);
@@ -434,7 +434,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA
if (last != NULL) {
mir_free(last);
lvItem.iSubItem = 0;
- lvItem.pszText = _T("");
+ lvItem.pszText = L"";
ListView_InsertItem(hList, &lvItem);
}
last = text;
@@ -470,7 +470,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA
break;
memset(tokenString, 0, ((len + 1) * sizeof(TCHAR)));
- mir_sntprintf(tokenString, len + 1, _T("%c%s%c"), (tr->flags & TRF_FIELD) ? FIELD_CHAR : FUNC_CHAR, tr->tszTokenString, (tr->flags & TRF_FIELD) ? FIELD_CHAR : '(');
+ mir_sntprintf(tokenString, len + 1, L"%c%s%c", (tr->flags & TRF_FIELD) ? FIELD_CHAR : FUNC_CHAR, tr->tszTokenString, (tr->flags & TRF_FIELD) ? FIELD_CHAR : '(');
SendDlgItemMessage(hwndInputDlg, IDC_TESTSTRING, EM_REPLACESEL, TRUE, (LPARAM)tokenString);
mir_free(tokenString);
SetFocus(GetDlgItem(hwndInputDlg, IDC_TESTSTRING));
diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp
index f6f217dcbb..9a29840a18 100644
--- a/plugins/Variables/src/parse_alias.cpp
+++ b/plugins/Variables/src/parse_alias.cpp
@@ -162,7 +162,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai)
mir_tstrcat(szArgs, argv[i]);
if (i != argv.getCount() - 1)
- mir_tstrcat(szArgs, _T(","));
+ mir_tstrcat(szArgs, L",");
}
int res;
if (szArgs != NULL && argv.getCount() > 0) {
@@ -184,7 +184,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai)
mir_free(szArgs);
mir_free(szHelp);
argv.destroy();
- return (res == 0) ? mir_tstrdup(_T("")) : NULL;
+ return (res == 0) ? mir_tstrdup(L"") : NULL;
}
void registerAliasTokens()
diff --git a/plugins/Variables/src/parse_alias.h b/plugins/Variables/src/parse_alias.h
index 5e708b32be..5876367aad 100644
--- a/plugins/Variables/src/parse_alias.h
+++ b/plugins/Variables/src/parse_alias.h
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define ADDALIAS _T("alias")
+#define ADDALIAS L"alias"
int isValidTokenChar(TCHAR tc);
diff --git a/plugins/Variables/src/parse_external.cpp b/plugins/Variables/src/parse_external.cpp
index 19a0a6de61..4dca2905f2 100644
--- a/plugins/Variables/src/parse_external.cpp
+++ b/plugins/Variables/src/parse_external.cpp
@@ -21,9 +21,9 @@
static TCHAR *getFullWinampTitleText()
{
- HWND hwndWinamp = FindWindow(_T("STUDIO"), NULL);
+ HWND hwndWinamp = FindWindow(L"STUDIO", NULL);
if (hwndWinamp == NULL)
- hwndWinamp = FindWindow(_T("Winamp v1.x"), NULL);
+ hwndWinamp = FindWindow(L"Winamp v1.x", NULL);
if (hwndWinamp == NULL)
return NULL;
@@ -61,7 +61,7 @@ static TCHAR *parseWinampSong(ARGUMENTSINFO *ai)
TCHAR *scur = _tcschr(szTitle, '.');
TCHAR *cur;
- if ((scur == NULL) || ((cur = _tcsstr(scur, _T(" - Winamp"))) == NULL) || (scur >= cur) || (scur > (szTitle + mir_tstrlen(szTitle) - 2)) || (cur > (szTitle + mir_tstrlen(szTitle)))) {
+ if ((scur == NULL) || ((cur = _tcsstr(scur, L" - Winamp")) == NULL) || (scur >= cur) || (scur > (szTitle + mir_tstrlen(szTitle) - 2)) || (cur > (szTitle + mir_tstrlen(szTitle)))) {
mir_free(szTitle);
return NULL;
}
@@ -87,14 +87,14 @@ static TCHAR *parseWinampState(ARGUMENTSINFO *ai)
TCHAR *scur = _tcschr(szTitle, '.');
TCHAR *cur;
- if (scur == NULL || (cur = _tcsstr(scur, _T(" - Winamp"))) == NULL)
+ if (scur == NULL || (cur = _tcsstr(scur, L" - Winamp")) == NULL)
res = mir_tstrdup(TranslateT("Stopped"));
- else if ((!_tcsncmp(cur + 10, _T("[Stopped]"), 9)))
+ else if ((!_tcsncmp(cur + 10, L"[Stopped]", 9)))
res = mir_tstrdup(TranslateT("Stopped"));
- else if ((!_tcsncmp(cur + 10, _T("[Paused]"), 8)))
+ else if ((!_tcsncmp(cur + 10, L"[Paused]", 8)))
res = mir_tstrdup(TranslateT("Paused"));
else
- res = mir_tstrdup(_T("Playing"));
+ res = mir_tstrdup(L"Playing");
mir_free(szTitle);
return res;
}
diff --git a/plugins/Variables/src/parse_external.h b/plugins/Variables/src/parse_external.h
index 53b8673555..2aa33f3bbd 100644
--- a/plugins/Variables/src/parse_external.h
+++ b/plugins/Variables/src/parse_external.h
@@ -17,6 +17,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define WINAMPSONG _T("winampsong")
-#define WINAMPSTATE _T("winampstate")
+#define WINAMPSONG L"winampsong"
+#define WINAMPSTATE L"winampstate"
#define DEF_WINAMPTITLE "Winamp3"
diff --git a/plugins/Variables/src/parse_inet.h b/plugins/Variables/src/parse_inet.h
index 53c39a7152..f3c4b46175 100644
--- a/plugins/Variables/src/parse_inet.h
+++ b/plugins/Variables/src/parse_inet.h
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define URLENC _T("urlenc")
-#define URLDEC _T("urldec")
-#define NTOA _T("ntoa")
-#define HTOA _T("htoa")
+#define URLENC L"urlenc"
+#define URLDEC L"urldec"
+#define NTOA L"ntoa"
+#define HTOA L"htoa"
diff --git a/plugins/Variables/src/parse_logic.cpp b/plugins/Variables/src/parse_logic.cpp
index 08bdfa9c6c..c06d8445a9 100644
--- a/plugins/Variables/src/parse_logic.cpp
+++ b/plugins/Variables/src/parse_logic.cpp
@@ -32,11 +32,11 @@ static TCHAR *parseAnd(ARGUMENTSINFO *ai)
if (fi.eCount > 0) {
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
}
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseFalse(ARGUMENTSINFO *ai)
@@ -45,7 +45,7 @@ static TCHAR *parseFalse(ARGUMENTSINFO *ai)
return NULL;
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseIf(ARGUMENTSINFO *ai)
@@ -166,7 +166,7 @@ static TCHAR *parseFor(ARGUMENTSINFO *ai)
if (ai->argc != 5)
return NULL;
- TCHAR *res = mir_tstrdup(_T(""));
+ TCHAR *res = mir_tstrdup(L"");
FORMATINFO fi;
memcpy(&fi, ai->fi, sizeof(fi));
@@ -209,7 +209,7 @@ static TCHAR *parseEqual(ARGUMENTSINFO *ai)
if (ttoi(ai->targv[1]) != ttoi(ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseGreater(ARGUMENTSINFO *ai)
@@ -220,7 +220,7 @@ static TCHAR *parseGreater(ARGUMENTSINFO *ai)
if (ttoi(ai->targv[1]) <= ttoi(ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseLonger(ARGUMENTSINFO *ai)
@@ -231,7 +231,7 @@ static TCHAR *parseLonger(ARGUMENTSINFO *ai)
if (mir_tstrlen(ai->targv[1]) <= mir_tstrlen(ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseNot(ARGUMENTSINFO *ai)
@@ -248,7 +248,7 @@ static TCHAR *parseNot(ARGUMENTSINFO *ai)
if (fi.eCount == 0)
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseOr(ARGUMENTSINFO *ai)
@@ -268,12 +268,12 @@ static TCHAR *parseOr(ARGUMENTSINFO *ai)
ai->flags &= ~AIF_FALSE;
}
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseTrue(ARGUMENTSINFO *ai)
{
- return (ai->argc != 1) ? NULL : mir_tstrdup(_T(""));
+ return (ai->argc != 1) ? NULL : mir_tstrdup(L"");
}
static TCHAR *parseXor(ARGUMENTSINFO *ai)
@@ -293,7 +293,7 @@ static TCHAR *parseXor(ARGUMENTSINFO *ai)
int val2 = fi.eCount == 0;
ai->flags |= ((val1 & AIF_FALSE) == !(val2 & AIF_FALSE)) ? 0 : AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
void registerLogicTokens()
diff --git a/plugins/Variables/src/parse_logic.h b/plugins/Variables/src/parse_logic.h
index 084c28e03a..6d6803ee7f 100644
--- a/plugins/Variables/src/parse_logic.h
+++ b/plugins/Variables/src/parse_logic.h
@@ -17,19 +17,19 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define AND _T("and")
-#define STR_FALSE _T("false")
-#define FOR _T("for")
-#define EQUAL _T("equal")
-#define GREATER _T("greater")
-#define IF _T("if")
-#define IF2 _T("if2")
-#define IF3 _T("if3")
-#define IFEQUAL _T("ifequal")
-#define IFGREATER _T("ifgreater")
-#define IFLONGER _T("iflonger")
-#define LONGER _T("longer")
-#define NOT _T("not")
-#define OR _T("or")
-#define STR_TRUE _T("true")
-#define XOR _T("xor")
+#define AND L"and"
+#define STR_FALSE L"false"
+#define FOR L"for"
+#define EQUAL L"equal"
+#define GREATER L"greater"
+#define IF L"if"
+#define IF2 L"if2"
+#define IF3 L"if3"
+#define IFEQUAL L"ifequal"
+#define IFGREATER L"ifgreater"
+#define IFLONGER L"iflonger"
+#define LONGER L"longer"
+#define NOT L"not"
+#define OR L"or"
+#define STR_TRUE L"true"
+#define XOR L"xor"
diff --git a/plugins/Variables/src/parse_math.cpp b/plugins/Variables/src/parse_math.cpp
index d71296a93d..0e65e29da2 100644
--- a/plugins/Variables/src/parse_math.cpp
+++ b/plugins/Variables/src/parse_math.cpp
@@ -54,14 +54,14 @@ static TCHAR *parseHex(ARGUMENTSINFO *ai)
int val = ttoi(ai->targv[1]);
int padding = ttoi(ai->targv[2]);
- mir_sntprintf(szVal, _T("%x"), val);
+ mir_sntprintf(szVal, L"%x", val);
unsigned int zeros = max(padding - (signed int)mir_tstrlen(szVal), 0);
TCHAR *res = (TCHAR*)mir_alloc((zeros + mir_tstrlen(szVal) + 3)*sizeof(TCHAR));
if (res == NULL)
return NULL;
memset(res, 0, ((zeros + mir_tstrlen(szVal) + 3) * sizeof(TCHAR)));
- mir_tstrcpy(res, _T("0x"));
+ mir_tstrcpy(res, L"0x");
for (i = 0; i < zeros; i++)
*(res + 2 + i) = '0';
diff --git a/plugins/Variables/src/parse_math.h b/plugins/Variables/src/parse_math.h
index 36d3c3e04c..300e3604eb 100644
--- a/plugins/Variables/src/parse_math.h
+++ b/plugins/Variables/src/parse_math.h
@@ -17,14 +17,14 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define ADD _T("add")
-#define DIV _T("div")
-#define HEX _T("hex")
-#define MOD _T("mod")
-#define MUL _T("mul")
-#define MULDIV _T("muldiv")
-#define MIN _T("min")
-#define MAX _T("max")
-#define NUM _T("num")
-#define RAND _T("rand")
-#define SUB _T("sub")
+#define ADD L"add"
+#define DIV L"div"
+#define HEX L"hex"
+#define MOD L"mod"
+#define MUL L"mul"
+#define MULDIV L"muldiv"
+#define MIN L"min"
+#define MAX L"max"
+#define NUM L"num"
+#define RAND L"rand"
+#define SUB L"sub"
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp
index 5e9c6a4db4..71ab1c08a6 100644
--- a/plugins/Variables/src/parse_metacontacts.cpp
+++ b/plugins/Variables/src/parse_metacontacts.cpp
@@ -40,11 +40,11 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai)
if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _T("%p"), hContact);
+ mir_sntprintf(tszID, L"%p", hContact);
szUniqueID = mir_tstrdup(tszID);
}
- return CMString(FORMAT, _T("<%S:%s>"), szProto, szUniqueID).Detach();
+ return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static TCHAR *parseGetDefault(ARGUMENTSINFO *ai)
@@ -68,11 +68,11 @@ static TCHAR *parseGetDefault(ARGUMENTSINFO *ai)
if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _T("%p"), hContact);
+ mir_sntprintf(tszID, L"%p", hContact);
szUniqueID = mir_tstrdup(tszID);
}
- return CMString(FORMAT, _T("<%S:%s>"), szProto, szUniqueID).Detach();
+ return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai)
@@ -96,11 +96,11 @@ static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai)
if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _T("%p"), hContact);
+ mir_sntprintf(tszID, L"%p", hContact);
szUniqueID = mir_tstrdup(tszID);
}
- return CMString(FORMAT, _T("<%S:%s>"), szProto, szUniqueID).Detach();
+ return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
void registerMetaContactsTokens()
diff --git a/plugins/Variables/src/parse_metacontacts.h b/plugins/Variables/src/parse_metacontacts.h
index 08b419d4d7..21ddd6bbeb 100644
--- a/plugins/Variables/src/parse_metacontacts.h
+++ b/plugins/Variables/src/parse_metacontacts.h
@@ -17,6 +17,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define MC_GETPARENT _T("mc_getparent")
-#define MC_GETDEFAULT _T("mc_getdefault")
-#define MC_GETMOSTONLINE _T("mc_getmostonline")
+#define MC_GETPARENT L"mc_getparent"
+#define MC_GETDEFAULT L"mc_getdefault"
+#define MC_GETMOSTONLINE L"mc_getmostonline"
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index 42a9762bd4..088fb00497 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -389,13 +389,13 @@ static TCHAR* parseSpecialContact(ARGUMENTSINFO *ai)
szUniqueID = (TCHAR*)mir_alloc(40);
if (szUniqueID == NULL)
return NULL;
- mir_sntprintf(szUniqueID, 20, _T("%p"), ai->fi->hContact);
+ mir_sntprintf(szUniqueID, 20, L"%p", ai->fi->hContact);
}
if (szUniqueID == NULL)
return NULL;
- return CMString(FORMAT, _T("<%S:%s>"), szProto, szUniqueID).Detach();
+ return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static BOOL isValidDbEvent(DBEVENTINFO *dbe, int flags)
@@ -624,7 +624,7 @@ static TCHAR *parseMirDateString(ARGUMENTSINFO *ai)
ai->flags |= AIF_DONTPARSE;
TCHAR ret[128];
- return mir_tstrdup(TimeZone_ToStringT(time(NULL), _T("d s"), ret, _countof(ret)));
+ return mir_tstrdup(TimeZone_ToStringT(time(NULL), L"d s", ret, _countof(ret)));
}
static TCHAR *parseMirandaCoreVar(ARGUMENTSINFO *ai)
@@ -635,7 +635,7 @@ static TCHAR *parseMirandaCoreVar(ARGUMENTSINFO *ai)
ai->flags |= AIF_DONTPARSE;
TCHAR corevar[MAX_PATH];
- mir_sntprintf(corevar, _T("%%%s%%"), ai->targv[0]);
+ mir_sntprintf(corevar, L"%%%s%%", ai->targv[0]);
return Utils_ReplaceVarsT(corevar);
}
@@ -647,24 +647,24 @@ static TCHAR *parseMirSrvExists(ARGUMENTSINFO *ai)
if (!ServiceExists(_T2A(ai->targv[1])))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
void registerMirandaTokens()
{
// global vars
- registerIntToken(_T("miranda_path"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("path to Miranda root folder"));
- registerIntToken(_T("miranda_profilesdir"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("path to folder containing Miranda profiles"));
- registerIntToken(_T("miranda_profilename"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("name of current Miranda profile (filename, without extension)"));
- registerIntToken(_T("miranda_userdata"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"));
- registerIntToken(_T("miranda_avatarcache"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%\\AvatarCache"));
- registerIntToken(_T("miranda_logpath"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%\\Logs"));
+ registerIntToken(L"miranda_path", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("path to Miranda root folder"));
+ registerIntToken(L"miranda_profilesdir", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("path to folder containing Miranda profiles"));
+ registerIntToken(L"miranda_profilename", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("name of current Miranda profile (filename, without extension)"));
+ registerIntToken(L"miranda_userdata", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"));
+ registerIntToken(L"miranda_avatarcache", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%\\AvatarCache"));
+ registerIntToken(L"miranda_logpath", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%\\Logs"));
// OS vars
- registerIntToken(_T("appdata"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("same as environment variable %APPDATA% for currently logged-on Windows user"));
- registerIntToken(_T("username"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("username for currently logged-on Windows user"));
- registerIntToken(_T("mydocuments"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("\"My Documents\" folder for currently logged-on Windows user"));
- registerIntToken(_T("desktop"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("\"Desktop\" folder for currently logged-on Windows user"));
+ registerIntToken(L"appdata", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("same as environment variable %APPDATA% for currently logged-on Windows user"));
+ registerIntToken(L"username", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("username for currently logged-on Windows user"));
+ registerIntToken(L"mydocuments", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("\"My Documents\" folder for currently logged-on Windows user"));
+ registerIntToken(L"desktop", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("\"Desktop\" folder for currently logged-on Windows user"));
registerIntToken(CODETOSTATUS, parseCodeToStatus, TRF_FUNCTION, LPGEN("Miranda Related") "\t(x)\t" LPGEN("translates status code x into a status description"));
registerIntToken(CONTACT, parseContact, TRF_FUNCTION, LPGEN("Miranda Related") "\t(x,y,z)\t" LPGEN("zth contact with property y described by x, example: (unregistered,nick) (z is optional)"));
diff --git a/plugins/Variables/src/parse_miranda.h b/plugins/Variables/src/parse_miranda.h
index 851b3963df..b5096cb4f0 100644
--- a/plugins/Variables/src/parse_miranda.h
+++ b/plugins/Variables/src/parse_miranda.h
@@ -17,27 +17,27 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define VERSIONSTRING _T("mirandaversion")
-#define CODETOSTATUS _T("code2status")
-#define CONTACT _T("contact")
-#define CONTACTCOUNT _T("ccount")
-#define MIR_CONTACTINFO _T("cinfo")
-#define DBPROFILENAME _T("dbprofile")
-#define DBPROFILEPATH _T("dbprofilepath")
-#define DBSETTING _T("dbsetting")
-#define LSDATE _T("lsdate")
-#define LSTIME _T("lstime")
-#define LSSTATUS _T("lsstatus")
+#define VERSIONSTRING L"mirandaversion"
+#define CODETOSTATUS L"code2status"
+#define CONTACT L"contact"
+#define CONTACTCOUNT L"ccount"
+#define MIR_CONTACTINFO L"cinfo"
+#define DBPROFILENAME L"dbprofile"
+#define DBPROFILEPATH L"dbprofilepath"
+#define DBSETTING L"dbsetting"
+#define LSDATE L"lsdate"
+#define LSTIME L"lstime"
+#define LSSTATUS L"lsstatus"
//#define SUBJECT "subject" // defined in variables.h
-#define MIRANDAPATH _T("mirandapath")
-#define MYSTATUS _T("mstatus")
-#define DBEVENT _T("message") // may be extended later
+#define MIRANDAPATH L"mirandapath"
+#define MYSTATUS L"mstatus"
+#define DBEVENT L"message" // may be extended later
//#define PROTONAME "protoname" // depreciated
-#define PROTOINFO _T("pinfo")
-#define TRANSLATE _T("translate")
-#define CONTACT_NAME _T("contactname")
-#define MIR_DATE _T("date")
-#define SRVEXISTS _T("srvexists")
+#define PROTOINFO L"pinfo"
+#define TRANSLATE L"translate"
+#define CONTACT_NAME L"contactname"
+#define MIR_DATE L"date"
+#define SRVEXISTS L"srvexists"
#define STR_PINAME "name"
#define STR_PIUIDTEXT "uidtext"
@@ -46,13 +46,13 @@
#define SEEN_MODULE "SeenModule"
-#define STR_PROTOID _T("protoid")
-#define STR_FIRST _T("first")
-#define STR_LAST _T("last")
-#define STR_SENT _T("sent")
-#define STR_RCVD _T("recv")
-#define STR_READ _T("read")
-#define STR_UNREAD _T("unread")
+#define STR_PROTOID L"protoid"
+#define STR_FIRST L"first"
+#define STR_LAST L"last"
+#define STR_SENT L"sent"
+#define STR_RCVD L"recv"
+#define STR_READ L"read"
+#define STR_UNREAD L"unread"
/* dbevent flags */
/* these flags must contain:
diff --git a/plugins/Variables/src/parse_regexp.cpp b/plugins/Variables/src/parse_regexp.cpp
index fb5366329b..f3e968ddb2 100644
--- a/plugins/Variables/src/parse_regexp.cpp
+++ b/plugins/Variables/src/parse_regexp.cpp
@@ -46,7 +46,7 @@ static TCHAR *parseRegExpCheck(ARGUMENTSINFO *ai)
return mir_a2t(szVal);
}
- return mir_tstrdup(_T("0"));
+ return mir_tstrdup(L"0");
}
/*
@@ -84,7 +84,7 @@ static TCHAR *parseRegExpSubstr(ARGUMENTSINFO *ai)
return tres;
}
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
void registerRegExpTokens()
diff --git a/plugins/Variables/src/parse_regexp.h b/plugins/Variables/src/parse_regexp.h
index f5eb289844..6d058e646a 100644
--- a/plugins/Variables/src/parse_regexp.h
+++ b/plugins/Variables/src/parse_regexp.h
@@ -17,5 +17,5 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define REGEXPCHECK _T("regexp_check")
-#define REGEXPSUBSTR _T("regexp_substr")
+#define REGEXPCHECK L"regexp_check"
+#define REGEXPSUBSTR L"regexp_substr"
diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp
index 27e6d324f1..23a18acc7e 100644
--- a/plugins/Variables/src/parse_str.cpp
+++ b/plugins/Variables/src/parse_str.cpp
@@ -67,7 +67,7 @@ static TCHAR *parseCaps2(ARGUMENTSINFO *ai)
static TCHAR *parseCrlf(ARGUMENTSINFO *ai)
{
ai->flags |= AIF_DONTPARSE;
- return mir_tstrdup(_T("\r\n"));
+ return mir_tstrdup(L"\r\n");
}
static TCHAR *parseEolToCrlf(ARGUMENTSINFO *ai)
@@ -87,7 +87,7 @@ static TCHAR *parseEolToCrlf(ARGUMENTSINFO *ai)
res = (TCHAR*)mir_realloc(res, (mir_tstrlen(res) + 2)*sizeof(TCHAR));
cur = res + loc;
memmove(cur + 2, cur + 1, (mir_tstrlen(cur + 1) + 1)*sizeof(TCHAR));
- memcpy(cur, _T("\r\n"), 2 * sizeof(TCHAR));
+ memcpy(cur, L"\r\n", 2 * sizeof(TCHAR));
cur += 2;
}
while (cur != NULL);
@@ -99,14 +99,14 @@ static TCHAR *parseFixeol(ARGUMENTSINFO *ai)
{
TCHAR *szReplacement;
if (ai->argc == 2)
- szReplacement = _T("(...)");
+ szReplacement = L"(...)";
else if (ai->argc == 3)
szReplacement = ai->targv[2];
else
return NULL;
TCHAR *cur = ai->targv[1];
- while (mir_tstrcmp(cur, _T("\r\n")) && *cur != '\n' && *cur != 0)
+ while (mir_tstrcmp(cur, L"\r\n") && *cur != '\n' && *cur != 0)
cur++;
if (*cur == '\0')
@@ -127,7 +127,7 @@ static TCHAR *parseFixeol2(ARGUMENTSINFO *ai)
{
TCHAR *szReplacement;
switch (ai->argc) {
- case 2: szReplacement = _T(" "); break;
+ case 2: szReplacement = L" "; break;
case 3: szReplacement = ai->targv[2]; break;
default: return NULL;
}
@@ -136,11 +136,11 @@ static TCHAR *parseFixeol2(ARGUMENTSINFO *ai)
for (size_t pos = 0; pos < mir_tstrlen(res); pos++) {
TCHAR *cur = res + pos;
TCHAR *szEol = NULL;
- if (!_tcsncmp(cur, _T("\r\n"), mir_tstrlen(_T("\r\n"))))
- szEol = _T("\r\n");
+ if (!_tcsncmp(cur, L"\r\n", mir_tstrlen(L"\r\n")))
+ szEol = L"\r\n";
if (*cur == '\n')
- szEol = _T("\n");
+ szEol = L"\n";
if (szEol != NULL) {
if (mir_tstrlen(szReplacement) > mir_tstrlen(szEol)) {
@@ -210,7 +210,7 @@ static TCHAR *parseLineCount(ARGUMENTSINFO *ai)
int count = 1;
TCHAR *cur = ai->targv[1];
while (cur < (ai->targv[1] + mir_tstrlen(ai->targv[1]))) {
- if (!_tcsncmp(cur, _T("\r\n"), 2)) {
+ if (!_tcsncmp(cur, L"\r\n", 2)) {
count++;
cur++;
}
@@ -490,7 +490,7 @@ static TCHAR *parseStrchr(ARGUMENTSINFO *ai)
memset(szVal, 0, sizeof(szVal));
TCHAR *c = _tcschr(ai->targv[1], *ai->targv[2]);
if (c == NULL || *c == 0)
- return mir_tstrdup(_T("0"));
+ return mir_tstrdup(L"0");
return itot(c - ai->targv[1] + 1);
}
@@ -503,7 +503,7 @@ static TCHAR *parseStrcmp(ARGUMENTSINFO *ai)
if (mir_tstrcmp(ai->targv[1], ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStrmcmp(ARGUMENTSINFO *ai)
@@ -519,7 +519,7 @@ static TCHAR *parseStrmcmp(ARGUMENTSINFO *ai)
}
}
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStrncmp(ARGUMENTSINFO *ai)
@@ -534,7 +534,7 @@ static TCHAR *parseStrncmp(ARGUMENTSINFO *ai)
if (_tcsncmp(ai->targv[1], ai->targv[2], n))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStricmp(ARGUMENTSINFO *ai)
@@ -545,7 +545,7 @@ static TCHAR *parseStricmp(ARGUMENTSINFO *ai)
if (mir_tstrcmpi(ai->targv[1], ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStrnicmp(ARGUMENTSINFO *ai)
@@ -560,7 +560,7 @@ static TCHAR *parseStrnicmp(ARGUMENTSINFO *ai)
if (_tcsnicmp(ai->targv[1], ai->targv[2], n))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStrrchr(ARGUMENTSINFO *ai)
@@ -570,7 +570,7 @@ static TCHAR *parseStrrchr(ARGUMENTSINFO *ai)
TCHAR *c = _tcsrchr(ai->targv[1], *ai->targv[2]);
if ((c == NULL) || (*c == 0))
- return mir_tstrdup(_T("0"));
+ return mir_tstrdup(L"0");
return itot(c - ai->targv[1] + 1);
}
@@ -582,7 +582,7 @@ static TCHAR *parseStrstr(ARGUMENTSINFO *ai)
TCHAR *c = _tcsstr(ai->targv[1], ai->targv[2]);
if ((c == NULL) || (*c == 0))
- return mir_tstrdup(_T("0"));
+ return mir_tstrdup(L"0");
return itot(c - ai->targv[1] + 1);
}
@@ -645,7 +645,7 @@ static TCHAR *parseTrim(ARGUMENTSINFO *ai)
ecur--;
if (scur >= ecur)
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
TCHAR *res = (TCHAR*)mir_alloc((ecur - scur + 2)*sizeof(TCHAR));
if (res == NULL)
@@ -754,7 +754,7 @@ static TCHAR *parseWord(ARGUMENTSINFO *ai)
TCHAR *pres = (TCHAR*)mir_realloc(res, (mir_tstrlen(res) + mir_tstrlen(szWord) + 2)*sizeof(TCHAR));
if (pres != NULL) {
res = pres;
- mir_tstrcat(res, _T(" "));
+ mir_tstrcat(res, L" ");
mir_tstrcat(res, szWord);
}
mir_free(szWord);
diff --git a/plugins/Variables/src/parse_str.h b/plugins/Variables/src/parse_str.h
index cab3c017bc..3c7232a137 100644
--- a/plugins/Variables/src/parse_str.h
+++ b/plugins/Variables/src/parse_str.h
@@ -17,41 +17,41 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define MIR_CAPS _T("caps")
-#define MIR_CAPS2 _T("caps2")
-#define MIR_CRLF _T("crlf")
+#define MIR_CAPS L"caps"
+#define MIR_CAPS2 L"caps2"
+#define MIR_CRLF L"crlf"
//#define MIR_EXTRATEXT "extratext" // defined in variables.h
-#define MIR_EOL2CRLF _T("eol2crlf")
-#define MIR_FIXEOL _T("fix_eol")
-#define MIR_FIXEOL2 _T("fix_eol2")
-#define MIR_INSERT _T("insert")
-#define MIR_LEFT _T("left")
-#define MIR_LEN _T("len")
-#define MIR_LINECOUNT _T("linecount")
-#define MIR_LONGEST _T("longest")
-#define MIR_LOWER _T("lower")
-#define MIR_NOOP _T("noop")
-#define MIR_PAD _T("pad")
-#define MIR_PADRIGHT _T("pad_right")
-#define MIR_PADCUT _T("padcut")
-#define MIR_PADCUTRIGHT _T("padcut_right")
-#define MIR_REPEAT _T("repeat")
-#define MIR_REPLACE _T("replace")
-#define MIR_RIGHT _T("right")
-#define MIR_SCROLL _T("scroll")
-#define MIR_SHORTEST _T("shortest")
-#define MIR_STRCHR _T("strchr")
-#define MIR_STRRCHR _T("strrchr")
-#define MIR_STRSTR _T("strstr")
-#define MIR_STRCMP _T("strcmp")
-#define MIR_STRNCMP _T("strncmp")
-#define MIR_STRMCMP _T("strmcmp")
-#define MIR_STRICMP _T("stricmp")
-#define MIR_STRNICMP _T("strnicmp")
-#define MIR_SUBSTR _T("substr")
-#define MIR_SELECT _T("select")
-#define MIR_SWITCH _T("switch")
-#define MIR_TRIM _T("trim")
-#define MIR_TAB _T("tab")
-#define MIR_UPPER _T("upper")
-#define MIR_WORD _T("word")
+#define MIR_EOL2CRLF L"eol2crlf"
+#define MIR_FIXEOL L"fix_eol"
+#define MIR_FIXEOL2 L"fix_eol2"
+#define MIR_INSERT L"insert"
+#define MIR_LEFT L"left"
+#define MIR_LEN L"len"
+#define MIR_LINECOUNT L"linecount"
+#define MIR_LONGEST L"longest"
+#define MIR_LOWER L"lower"
+#define MIR_NOOP L"noop"
+#define MIR_PAD L"pad"
+#define MIR_PADRIGHT L"pad_right"
+#define MIR_PADCUT L"padcut"
+#define MIR_PADCUTRIGHT L"padcut_right"
+#define MIR_REPEAT L"repeat"
+#define MIR_REPLACE L"replace"
+#define MIR_RIGHT L"right"
+#define MIR_SCROLL L"scroll"
+#define MIR_SHORTEST L"shortest"
+#define MIR_STRCHR L"strchr"
+#define MIR_STRRCHR L"strrchr"
+#define MIR_STRSTR L"strstr"
+#define MIR_STRCMP L"strcmp"
+#define MIR_STRNCMP L"strncmp"
+#define MIR_STRMCMP L"strmcmp"
+#define MIR_STRICMP L"stricmp"
+#define MIR_STRNICMP L"strnicmp"
+#define MIR_SUBSTR L"substr"
+#define MIR_SELECT L"select"
+#define MIR_SWITCH L"switch"
+#define MIR_TRIM L"trim"
+#define MIR_TAB L"tab"
+#define MIR_UPPER L"upper"
+#define MIR_WORD L"word"
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp
index 9e92647542..43695c7db0 100644
--- a/plugins/Variables/src/parse_system.cpp
+++ b/plugins/Variables/src/parse_system.cpp
@@ -52,14 +52,14 @@ static TCHAR *parseCpuLoad(ARGUMENTSINFO *ai)
return NULL;
if (mir_tstrlen(ai->targv[1]) == 0)
- szCounter = mir_tstrdup(_T("\\Processor(_Total)\\% Processor Time"));
+ szCounter = mir_tstrdup(L"\\Processor(_Total)\\% Processor Time");
else {
int size = (int)mir_tstrlen(ai->targv[1]) + 32;
szCounter = (TCHAR *)mir_alloc(size * sizeof(TCHAR));
if (szCounter == NULL)
return NULL;
- mir_sntprintf(szCounter, size, _T("\\Process(%s)\\%% Processor Time"), ai->targv[1]);
+ mir_sntprintf(szCounter, size, L"\\Process(%s)\\%% Processor Time", ai->targv[1]);
}
PDH_STATUS pdhStatus = PdhValidatePath(szCounter);
if (pdhStatus != ERROR_SUCCESS) {
@@ -105,7 +105,7 @@ static TCHAR *parseCpuLoad(ARGUMENTSINFO *ai)
pdhStatus = PdhCloseQuery(hQuery);
return NULL;
}
- mir_sntprintf(szVal, _T("%.0f"), cValue.doubleValue);
+ mir_sntprintf(szVal, L"%.0f", cValue.doubleValue);
//PdhRemoveCounter(*hCounter);
PdhCloseQuery(hQuery);
mir_free(szCounter);
@@ -282,7 +282,7 @@ static TCHAR *parseDiffTime(ARGUMENTSINFO *ai)
return NULL;
diff = difftime(mktime(&t1), mktime(&t0));
- mir_sntprintf(szTime, _T("%.0f"), diff);
+ mir_sntprintf(szTime, L"%.0f", diff);
return mir_tstrdup(szTime);
}
@@ -298,7 +298,7 @@ static TCHAR *parseDirExists(ARGUMENTSINFO *ai)
else
CloseHandle(hFile);
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseEnvironmentVariable(ARGUMENTSINFO *ai)
@@ -333,7 +333,7 @@ static TCHAR *parseFileExists(ARGUMENTSINFO *ai)
else
CloseHandle(hFile);
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseFindWindow(ARGUMENTSINFO *ai)
@@ -366,8 +366,8 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai)
TCHAR tszFirst[MAX_PATH], *tszRes, *tszSeperator, *tszFilter;
tszFirst[0] = 0;
- tszSeperator = _T("\r\n");
- tszFilter = _T("*");
+ tszSeperator = L"\r\n";
+ tszFilter = L"*";
tszRes = NULL;
if (ai->argc > 1)
@@ -389,7 +389,7 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai)
if (tszFirst[mir_tstrlen(tszFirst) - 1] == '\\')
mir_tstrncat(tszFirst, tszFilter, _countof(tszFirst) - mir_tstrlen(tszFirst) - 1);
else {
- mir_tstrncat(tszFirst, _T("\\"), _countof(tszFirst) - mir_tstrlen(tszFirst) - 1);
+ mir_tstrncat(tszFirst, L"\\", _countof(tszFirst) - mir_tstrlen(tszFirst) - 1);
mir_tstrncat(tszFirst, tszFilter, _countof(tszFirst) - mir_tstrlen(tszFirst) - 1);
}
@@ -410,7 +410,7 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai)
}
else {
tszRes = (TCHAR*)mir_alloc((mir_tstrlen(ffd.cFileName) + mir_tstrlen(tszSeperator) + 1)*sizeof(TCHAR));
- mir_tstrcpy(tszRes, _T(""));
+ mir_tstrcpy(tszRes, L"");
}
mir_tstrcat(tszRes, ffd.cFileName);
}
@@ -443,7 +443,7 @@ static TCHAR *parseProcessRunning(ARGUMENTSINFO *ai)
ai->flags |= AIF_FALSE;
mir_free(ref);
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
#endif
@@ -466,13 +466,13 @@ static TCHAR *parseRegistryValue(ARGUMENTSINFO *ai)
*cur = 0;
HKEY hKey;
- if (!mir_tstrcmp(key, _T("HKEY_CLASSES_ROOT")))
+ if (!mir_tstrcmp(key, L"HKEY_CLASSES_ROOT"))
hKey = HKEY_CLASSES_ROOT;
- else if (!mir_tstrcmp(key, _T("HKEY_CURRENT_USER")))
+ else if (!mir_tstrcmp(key, L"HKEY_CURRENT_USER"))
hKey = HKEY_CURRENT_USER;
- else if (!mir_tstrcmp(key, _T("HKEY_LOCAL_MACHINE")))
+ else if (!mir_tstrcmp(key, L"HKEY_LOCAL_MACHINE"))
hKey = HKEY_LOCAL_MACHINE;
- else if (!mir_tstrcmp(key, _T("HKEY_USERS")))
+ else if (!mir_tstrcmp(key, L"HKEY_USERS"))
hKey = HKEY_USERS;
else {
mir_free(key);
@@ -659,7 +659,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai)
totalReadSz += readSz;
for (pCur = pBuf; *pCur != '\0'; pCur += csz) {
if (tUC) {
- if (!_tcsncmp((TCHAR*)pCur, _T("\r\n"), 2)) {
+ if (!_tcsncmp((TCHAR*)pCur, L"\r\n", 2)) {
lineCount++;
pCur += csz;
}
@@ -699,7 +699,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai)
linePos = (tUC ? csz : 0) + totalReadSz - readSz + pCur - pBuf;
if (tUC) {
- if (!_tcsncmp((TCHAR*)pCur, _T("\r\n"), 2)) {
+ if (!_tcsncmp((TCHAR*)pCur, L"\r\n", 2)) {
lineCount++;
pCur += csz;
}
@@ -738,7 +738,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai)
return NULL;
}
for (pCur = pBuf; (pCur < pBuf + readSz); pCur += csz) {
- if ((tUC) && ((!_tcsncmp((TCHAR*)pCur, _T("\r\n"), 2)) || (*(TCHAR*)pCur == '\n')) ||
+ if ((tUC) && ((!_tcsncmp((TCHAR*)pCur, L"\r\n", 2)) || (*(TCHAR*)pCur == '\n')) ||
((!tUC) && (((!strncmp((char *)pCur, "\r\n", 2)) || (*(char *)pCur == '\n'))))) {
CloseHandle(hFile);
if (tUC)
@@ -798,7 +798,7 @@ static TCHAR *parseUpTime(ARGUMENTSINFO *ai)
return NULL;
HCOUNTER hCounter;
- pdhStatus = PdhAddCounter(hQuery, _T("\\System\\System Up Time"), 0, &hCounter);
+ pdhStatus = PdhAddCounter(hQuery, L"\\System\\System Up Time", 0, &hCounter);
if (pdhStatus != ERROR_SUCCESS) {
PdhCloseQuery(hQuery);
return NULL;
@@ -819,7 +819,7 @@ static TCHAR *parseUpTime(ARGUMENTSINFO *ai)
}
TCHAR szVal[32];
- mir_sntprintf(szVal, _T("%u"), cValue.largeValue);
+ mir_sntprintf(szVal, L"%u", cValue.largeValue);
PdhRemoveCounter(hCounter);
PdhCloseQuery(hQuery);
return mir_tstrdup(szVal);
diff --git a/plugins/Variables/src/parse_system.h b/plugins/Variables/src/parse_system.h
index 974d8b8cf6..b900f53488 100644
--- a/plugins/Variables/src/parse_system.h
+++ b/plugins/Variables/src/parse_system.h
@@ -17,26 +17,26 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define COMPUTERNAME _T("computername")
-#define CPULOAD _T("cpuload")
-#define CDATE _T("cdate")
-#define CTIME _T("ctime")
-#define DIRECTORY _T("directory")
-#define DIRECTORY2 _T("directory2")
-#define DIFFTIME _T("difftime")
-#define DIREXISTS _T("direxists")
-#define ENVIRONMENTVARIABLE _T("env_var")
-#define FILEEXISTS _T("fileexists")
-#define FINDWINDOW _T("findwindow")
-#define LISTDIR _T("ls")
-#define PROCESSRUNNING _T("processrunning")
-#define REGISTRYVALUE _T("regvalue")
-#define TIMESTAMP2DATE _T("ts2date")
-#define TIMESTAMP2TIME _T("ts2time")
-#define TXTFILE _T("txtfile")
-#define UPTIME _T("uptime")
-#define USERNAME _T("username")
-#define CLIPBOARD _T("clipboard")
+#define COMPUTERNAME L"computername"
+#define CPULOAD L"cpuload"
+#define CDATE L"cdate"
+#define CTIME L"ctime"
+#define DIRECTORY L"directory"
+#define DIRECTORY2 L"directory2"
+#define DIFFTIME L"difftime"
+#define DIREXISTS L"direxists"
+#define ENVIRONMENTVARIABLE L"env_var"
+#define FILEEXISTS L"fileexists"
+#define FINDWINDOW L"findwindow"
+#define LISTDIR L"ls"
+#define PROCESSRUNNING L"processrunning"
+#define REGISTRYVALUE L"regvalue"
+#define TIMESTAMP2DATE L"ts2date"
+#define TIMESTAMP2TIME L"ts2time"
+#define TXTFILE L"txtfile"
+#define UPTIME L"uptime"
+#define USERNAME L"username"
+#define CLIPBOARD L"clipboard"
#define TXTFILEBUFSZ 4096
#define MAX_REGVALUE_LENGTH 1024
diff --git a/plugins/Variables/src/parse_variables.cpp b/plugins/Variables/src/parse_variables.cpp
index d15e108817..bc19f44cfc 100644
--- a/plugins/Variables/src/parse_variables.cpp
+++ b/plugins/Variables/src/parse_variables.cpp
@@ -85,7 +85,7 @@ static TCHAR *parsePuts(ARGUMENTSINFO *ai)
if (addToVariablesRegister(ai->targv[1], ai->targv[2]))
return NULL;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseGet(ARGUMENTSINFO *ai)
diff --git a/plugins/Variables/src/parse_variables.h b/plugins/Variables/src/parse_variables.h
index ce22fd3618..b623f5a4c1 100644
--- a/plugins/Variables/src/parse_variables.h
+++ b/plugins/Variables/src/parse_variables.h
@@ -23,7 +23,7 @@ typedef struct {
DWORD dwOwnerThread;
} VARIABLEREGISTER;
-#define PUT _T("put")
-#define PUTS _T("puts")
-#define GET _T("get")
+#define PUT L"put"
+#define PUTS L"puts"
+#define GET L"get"
diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h
index 18d94c61ca..66570a7aa6 100644
--- a/plugins/Variables/src/stdafx.h
+++ b/plugins/Variables/src/stdafx.h
@@ -85,8 +85,8 @@
#define COMMENT_STRING "#"
// special tokens
-#define SUBJECT _T("subject")
-#define MIR_EXTRATEXT _T("extratext")
+#define SUBJECT L"subject"
+#define MIR_EXTRATEXT L"extratext"
#define VAR_HELP_TEXT LPGENT("--- Special characters ---\r\n\r\n\
The following characters have a special meaning in a formatting string:\r\n\r\n\
diff --git a/plugins/Variables/src/tokenregister.cpp b/plugins/Variables/src/tokenregister.cpp
index 7cf2fb0300..b74465ce99 100644
--- a/plugins/Variables/src/tokenregister.cpp
+++ b/plugins/Variables/src/tokenregister.cpp
@@ -121,7 +121,7 @@ INT_PTR registerToken(WPARAM, LPARAM lParam)
memcpy(&tre->tr, newVr, newVr->cbSize);
tre->nameHash = hash;
- if (!mir_tstrcmp(newVr->tszTokenString, _T("alias")))
+ if (!mir_tstrcmp(newVr->tszTokenString, L"alias"))
log_debugA("alias");
if (!(newVr->flags & TRF_PARSEFUNC) && newVr->szService != NULL)
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp
index 1111ddae0c..83c34b279a 100644
--- a/plugins/Variables/src/variables.cpp
+++ b/plugins/Variables/src/variables.cpp
@@ -78,7 +78,7 @@ TCHAR* getArguments(TCHAR *string, TArgList &argv)
if (cur > scur)
tszArg = mir_tstrndup(scur + 1, cur - (scur + 1));
if (tszArg == NULL)
- tszArg = mir_tstrdup(_T(""));
+ tszArg = mir_tstrdup(L"");
argv.insert(tszArg);
bNewArg = false;
@@ -145,7 +145,7 @@ static TCHAR* replaceDynVars(FORMATINFO *fi)
continue;
}
// remove end of lines
- else if ((!_tcsncmp(cur, _T("\r\n"), 2)) && (gParseOpts.bStripEOL)) {
+ else if ((!_tcsncmp(cur, L"\r\n", 2)) && (gParseOpts.bStripEOL)) {
memmove(cur, cur + 2, (mir_tstrlen(cur + 2) + 1)*sizeof(TCHAR));
pos = cur - string - 1;
continue;
@@ -158,7 +158,7 @@ static TCHAR* replaceDynVars(FORMATINFO *fi)
// remove comments
else if (!_tcsncmp(cur, _T(COMMENT_STRING), mir_tstrlen(_T(COMMENT_STRING)))) {
TCHAR *scur = cur;
- while (_tcsncmp(cur, _T("\r\n"), 2) && *cur != '\n' && *cur != 0)
+ while (_tcsncmp(cur, L"\r\n", 2) && *cur != '\n' && *cur != 0)
cur++;
if (*cur == 0) {