summaryrefslogtreecommitdiff
path: root/plugins/Variables/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Variables/src')
-rw-r--r--plugins/Variables/src/parse_alias.cpp2
-rw-r--r--plugins/Variables/src/parse_inet.cpp4
-rw-r--r--plugins/Variables/src/parse_str.cpp18
-rw-r--r--plugins/Variables/src/parse_system.cpp6
-rw-r--r--plugins/Variables/src/variables.cpp4
5 files changed, 17 insertions, 17 deletions
diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp
index f0d745f95e..d08a05a2ec 100644
--- a/plugins/Variables/src/parse_alias.cpp
+++ b/plugins/Variables/src/parse_alias.cpp
@@ -62,7 +62,7 @@ static TCHAR *replaceArguments(TCHAR *res, TCHAR *tArg, TCHAR *rArg)
return NULL;
}
memmove(res + ecur + (mir_tstrlen(rArg) - mir_tstrlen(tArg)), res + ecur, (mir_tstrlen(res + ecur) + 1)*sizeof(TCHAR));
- mir_tstrncpy(res + cur, rArg, mir_tstrlen(rArg));
+ _tcsncpy(res + cur, rArg, mir_tstrlen(rArg));
}
}
cur++;
diff --git a/plugins/Variables/src/parse_inet.cpp b/plugins/Variables/src/parse_inet.cpp
index d0f128d731..c1c6f405ac 100644
--- a/plugins/Variables/src/parse_inet.cpp
+++ b/plugins/Variables/src/parse_inet.cpp
@@ -41,7 +41,7 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai)
char hex[8];
memmove(res + cur + 3, res + cur + 1, mir_strlen(res + cur + 1) + 1);
mir_snprintf(hex, SIZEOF(hex), "%%%x", *(res + cur));
- mir_strncpy(res + cur, hex, mir_strlen(hex));
+ strncpy(res + cur, hex, mir_strlen(hex));
cur += mir_strlen(hex);
}
@@ -64,7 +64,7 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai)
if ((*(res + cur) == '%') && (mir_strlen(res + cur) >= 3)) {
char hex[8];
memset(hex, '\0', sizeof(hex));
- mir_strncpy(hex, res + cur + 1, 2);
+ strncpy(hex, res + cur + 1, 2);
*(res + cur) = (char)strtol(hex, NULL, 16);
memmove(res + cur + 1, res + cur + 3, mir_strlen(res + cur + 3) + 1);
}
diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp
index 4e1b65f725..a8903e89f0 100644
--- a/plugins/Variables/src/parse_str.cpp
+++ b/plugins/Variables/src/parse_str.cpp
@@ -118,7 +118,7 @@ static TCHAR *parseFixeol(ARGUMENTSINFO *ai)
return res;
memset(res, 0, (((cur - ai->targv[1]) + 1) * sizeof(TCHAR)));
- mir_tstrncpy(res, ai->targv[1], cur - ai->targv[1]);
+ _tcsncpy(res, ai->targv[1], cur - ai->targv[1]);
mir_tstrcat(res, szReplacement);
return res;
}
@@ -169,7 +169,7 @@ static TCHAR *parseInsert(ARGUMENTSINFO *ai)
return NULL;
memset(res, 0, ((mir_tstrlen(ai->targv[1]) + mir_tstrlen(ai->targv[2]) + 1) * sizeof(TCHAR)));
- mir_tstrncpy(res, ai->targv[1], pos);
+ _tcsncpy(res, ai->targv[1], pos);
mir_tstrcpy(res + pos, ai->targv[2]);
mir_tstrcpy(res + pos + mir_tstrlen(ai->targv[2]), ai->targv[1] + pos);
return res;
@@ -190,7 +190,7 @@ static TCHAR *parseLeft(ARGUMENTSINFO *ai)
return NULL;
memset(res, 0, ((len + 1) * sizeof(TCHAR)));
- mir_tstrncpy(res, ai->targv[1], len);
+ _tcsncpy(res, ai->targv[1], len);
return res;
}
@@ -334,7 +334,7 @@ static TCHAR *parsePadcut(ARGUMENTSINFO *ai)
*cur++ = padchar;
if (padding > addcount)
- mir_tstrncpy(res + addcount, ai->targv[1], padding - addcount);
+ _tcsncpy(res + addcount, ai->targv[1], padding - addcount);
return res;
}
@@ -363,7 +363,7 @@ static TCHAR *parsePadcutright(ARGUMENTSINFO *ai)
*cur++ = padchar;
if (padding > addcount)
- mir_tstrncpy(res, ai->targv[1], padding - addcount);
+ _tcsncpy(res, ai->targv[1], padding - addcount);
return res;
}
@@ -434,7 +434,7 @@ static TCHAR *parseRight(ARGUMENTSINFO *ai)
return NULL;
memset(res, 0, ((len + 1)*sizeof(TCHAR)));
- mir_tstrncpy(res, ai->targv[1] + mir_tstrlen(ai->targv[1]) - len, len);
+ _tcsncpy(res, ai->targv[1] + mir_tstrlen(ai->targv[1]) - len, len);
return res;
}
@@ -603,7 +603,7 @@ static TCHAR *parseSubstr(ARGUMENTSINFO *ai)
TCHAR *res = (TCHAR*)mir_alloc((to - from + 1)*sizeof(TCHAR));
memset(res, 0, ((to - from + 1) * sizeof(TCHAR)));
- mir_tstrncpy(res, ai->targv[1] + from, to - from);
+ _tcsncpy(res, ai->targv[1] + from, to - from);
return res;
}
@@ -652,7 +652,7 @@ static TCHAR *parseTrim(ARGUMENTSINFO *ai)
return NULL;
memset(res, 0, ((ecur - scur + 2) * sizeof(TCHAR)));
- mir_tstrncpy(res, scur, ecur - scur + 1);
+ _tcsncpy(res, scur, ecur - scur + 1);
return res;
}
@@ -723,7 +723,7 @@ static TCHAR *getNthWord(TCHAR *szString, int w)
return NULL;
memset(res, 0, ((ecur - scur + 1) * sizeof(TCHAR)));
- mir_tstrncpy(res, scur, ecur - scur);
+ _tcsncpy(res, scur, ecur - scur);
return res;
}
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp
index b815f8f104..73c83cf22e 100644
--- a/plugins/Variables/src/parse_system.cpp
+++ b/plugins/Variables/src/parse_system.cpp
@@ -182,7 +182,7 @@ static TCHAR *parseDirectory(ARGUMENTSINFO *ai)
break;
TCHAR *res = (TCHAR*)mir_alloc((ei - bi + 1) * sizeof(TCHAR));
- mir_tstrncpy(res, ai->targv[1] + bi, ei - bi);
+ _tcsncpy(res, ai->targv[1] + bi, ei - bi);
res[ei - bi] = 0;
return res;
}
@@ -218,7 +218,7 @@ static TCHAR *parseDirectory2(ARGUMENTSINFO *ai)
if (res == NULL)
return NULL;
- mir_tstrncpy(res, ai->targv[1], (ecur - ai->targv[1]) + 1);
+ _tcsncpy(res, ai->targv[1], (ecur - ai->targv[1]) + 1);
return res;
}
@@ -371,7 +371,7 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai)
tszRes = NULL;
if (ai->argc > 1)
- mir_tstrncpy(tszFirst, ai->targv[1], SIZEOF(tszFirst) - 1);
+ _tcsncpy(tszFirst, ai->targv[1], SIZEOF(tszFirst) - 1);
if (ai->argc > 2)
tszFilter = ai->targv[2];
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp
index 4e38a5194f..3c5652f6f1 100644
--- a/plugins/Variables/src/variables.cpp
+++ b/plugins/Variables/src/variables.cpp
@@ -92,7 +92,7 @@ TCHAR* getArguments(TCHAR *string, TCHAR ***aargv, int *aargc)
}
memset(argv[argc], '\0', (cur-(scur+1)+1)*sizeof(TCHAR));
- mir_tstrncpy(argv[argc], scur+1, cur-(scur+1));
+ _tcsncpy(argv[argc], scur+1, cur-(scur+1));
}
else argv[argc] = mir_tstrdup(_T(""));
@@ -233,7 +233,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)
return NULL;
}
memset(token, '\0', (tcur-scur+1)*sizeof(TCHAR));
- mir_tstrncpy(token, cur+1, tcur-scur);
+ _tcsncpy(token, cur+1, tcur-scur);
// cur points to FIELD_CHAR or FUNC_CHAR
tmpVarPos = -1;
tr = NULL;