summaryrefslogtreecommitdiff
path: root/plugins/Variables
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-24 21:25:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-24 21:25:59 +0000
commit2a3b48f91c74e4d0115c26af702a4d2ffccfc805 (patch)
tree307b681fa5b1a83db485334d3d24b80d2333c39d /plugins/Variables
parent467d090133efe3ee3bf093954a333928f001c8a5 (diff)
end of zoo with various _WIN32_WINNT versions
git-svn-id: http://svn.miranda-ng.org/main/trunk@13112 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables')
-rw-r--r--plugins/Variables/src/parse_system.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp
index ab94f0dca0..7551ecab15 100644
--- a/plugins/Variables/src/parse_system.cpp
+++ b/plugins/Variables/src/parse_system.cpp
@@ -37,7 +37,6 @@ static TCHAR *parseComputerName(ARGUMENTSINFO *ai)
return res;
}
-#if _WIN32_WINNT>=0x0500
#include <pdh.h>
#include <pdhmsg.h>
@@ -113,7 +112,6 @@ static TCHAR *parseCpuLoad(ARGUMENTSINFO *ai)
return mir_tstrdup(szVal);
}
-#endif
static TCHAR *parseCurrentDate(ARGUMENTSINFO *ai)
{
@@ -789,7 +787,6 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai)
return NULL;
}
-#if _WIN32_WINNT>=0x0500
static TCHAR *parseUpTime(ARGUMENTSINFO *ai)
{
if (ai->argc != 1)
@@ -827,7 +824,6 @@ static TCHAR *parseUpTime(ARGUMENTSINFO *ai)
PdhCloseQuery(hQuery);
return mir_tstrdup(szVal);
}
-#endif
static TCHAR *parseUserName(ARGUMENTSINFO *ai)
{
@@ -879,9 +875,7 @@ static TCHAR *parseClipboard(ARGUMENTSINFO *ai)
void registerSystemTokens()
{
registerIntToken(COMPUTERNAME, parseComputerName, TRF_FIELD, LPGEN("System Functions")"\t"LPGEN("computer name"));
-#if _WIN32_WINNT>=0x0500
registerIntToken(CPULOAD, parseCpuLoad, TRF_FUNCTION, LPGEN("System Functions")"\t(x)\t"LPGEN("CPU load of process x (without extension) (x is optional)"));
-#endif
registerIntToken(CDATE, parseCurrentDate, TRF_FUNCTION, LPGEN("System Functions")"\t(y)\t"LPGEN("current date in format y (y is optional)"));
registerIntToken(CTIME, parseCurrentTime, TRF_FUNCTION, LPGEN("System Functions")"\t(y)\t"LPGEN("current time in format y (y is optional)"));
registerIntToken(DIRECTORY, parseDirectory, TRF_FUNCTION, LPGEN("System Functions")"\t(x,y)\t"LPGEN("the directory y directories above x"));
@@ -898,9 +892,8 @@ void registerSystemTokens()
registerIntToken(TIMESTAMP2DATE, parseTimestamp2Date, TRF_FUNCTION, LPGEN("System Functions")"\t(x,y)\t"LPGEN("formats timestamp x (seconds since 1/1/1970) in date format y"));
registerIntToken(TIMESTAMP2TIME, parseTimestamp2Time, TRF_FUNCTION, LPGEN("System Functions")"\t(x,y)\t"LPGEN("formats timestamp x (seconds since 1/1/1970) in time format y"));
registerIntToken(TXTFILE, parseTextFile, TRF_FUNCTION, LPGEN("System Functions")"\t(x,y)\t"LPGEN("y > 0: line number y from file x, y = 0: the whole file, y < 0: line y counted from the end, y = r: random line"));
-#if _WIN32_WINNT>=0x0500
registerIntToken(UPTIME, parseUpTime, TRF_FIELD, LPGEN("System Functions")"\t"LPGEN("uptime in seconds"));
-#endif
+
if (!ServiceExists(MS_UTILS_REPLACEVARS))
registerIntToken(ENVIRONMENTVARIABLE, parseEnvironmentVariable, TRF_FUNCTION, LPGEN("Miranda Core OS")"\t(%xxxxxxx%)\t"LPGEN("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"));
else {