summaryrefslogtreecommitdiff
path: root/plugins/Variables/src/parse_str.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2013-02-14 13:22:47 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2013-02-14 13:22:47 +0000
commitb67a0345014079ca4d6d2ffc95d55086abc5b96b (patch)
treed4cc57ded9a6b19796bd32974f3731414ffb014c /plugins/Variables/src/parse_str.cpp
parent25359ca57da5cc1dd5d6e34ca7b5bd65353f092a (diff)
minor cleanup and typos (by Basil)
git-svn-id: http://svn.miranda-ng.org/main/trunk@3600 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src/parse_str.cpp')
-rw-r--r--plugins/Variables/src/parse_str.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp
index 3eb6314183..8b0740654d 100644
--- a/plugins/Variables/src/parse_str.cpp
+++ b/plugins/Variables/src/parse_str.cpp
@@ -133,7 +133,7 @@ static TCHAR *parseFixeol2(ARGUMENTSINFO *ai)
}
TCHAR *res = mir_tstrdup(ai->targv[1]);
- for (unsigned int pos=0; pos < _tcslen(res); pos++ ) {
+ for (size_t pos=0; pos < _tcslen(res); pos++ ) {
TCHAR *cur = res+pos;
TCHAR *szEol = NULL;
if (!_tcsncmp(cur, _T("\r\n"), _tcslen(_T("\r\n"))))
@@ -393,16 +393,14 @@ static TCHAR *parseRepeat(ARGUMENTSINFO *ai)
}
static TCHAR *parseReplace(ARGUMENTSINFO *ai) {
-
- TCHAR *res, *cur;
- unsigned int i, pos;
-
if ((ai->argc < 4) || (ai->argc%2 != 0)) {
return NULL;
}
- pos = 0;
- res = mir_tstrdup(ai->targv[1]);
- for (i=2;i<ai->argc;i+=2) {
+ TCHAR *cur;
+
+ size_t pos = 0;
+ TCHAR *res = mir_tstrdup(ai->targv[1]);
+ for (size_t i=2;i<ai->argc;i+=2) {
if ( _tcslen(ai->targv[i]) == 0) {
continue;
}
@@ -861,7 +859,7 @@ int registerStrTokens() {
registerIntToken(_T(PAD), parsePad, TRF_FUNCTION, LPGEN("String Functions")"\t(x,y,z)\t"LPGEN("pads x to length y prepending character z (z is optional)"));
registerIntToken(_T(PADRIGHT), parsePadright, TRF_FUNCTION, LPGEN("String Functions")"\t(x,y,z)\t"LPGEN("pads x to length y appending character z (z is optional)"));
registerIntToken(_T(PADCUT), parsePadcut, TRF_FUNCTION, LPGEN("String Functions")"\t(x,y,z)\t"LPGEN("pads x to length y prepending character z, or cut if x is longer (z is optional)"));
- registerIntToken(_T(PADCUTRIGHT), parsePadcutright, TRF_FUNCTION, LPGEN("String Functions")"\t"LPGEN("(x,y,z)\tpads x to length y appending character z, or cut if x is longer (z is optional)"));
+ registerIntToken(_T(PADCUTRIGHT), parsePadcutright, TRF_FUNCTION, LPGEN("String Functions")"\t(x,y,z)\t"LPGEN("pads x to length y appending character z, or cut if x is longer (z is optional)"));
registerIntToken(_T(REPEAT), parseRepeat, TRF_FUNCTION, LPGEN("String Functions")"\t(x,y)\t"LPGEN("repeats x y times"));
registerIntToken(_T(REPLACE), parseReplace, TRF_FUNCTION, LPGEN("String Functions")"\t(x,y,z,...)\t"LPGEN("replace all occurrences of y in x with z, multiple y and z arguments allowed"));
registerIntToken(_T(RIGHT), parseRight, TRF_FUNCTION, LPGEN("String Functions")"\t(x,y)\t"LPGEN("trims x to length y, keeping last y characters"));