diff options
Diffstat (limited to 'plugins/Variables/src')
| -rw-r--r-- | plugins/Variables/src/contact.cpp | 2 | ||||
| -rw-r--r-- | plugins/Variables/src/parse_alias.cpp | 2 | ||||
| -rw-r--r-- | plugins/Variables/src/parse_inet.cpp | 4 | ||||
| -rw-r--r-- | plugins/Variables/src/parse_str.cpp | 8 | ||||
| -rw-r--r-- | plugins/Variables/src/variables.cpp | 14 | 
5 files changed, 15 insertions, 15 deletions
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 64d4dfb308..65a92523e4 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -379,7 +379,7 @@ static int contactSettingChanged(WPARAM hContact, LPARAM lParam)  			/* remove from cache */
  			mir_free(cce[i].tszContact);
  			if (cacheSize > 1) {
 -				MoveMemory(&cce[i], &cce[cacheSize-1], sizeof(CONTACTCE));
 +				memmove(&cce[i], &cce[cacheSize-1], sizeof(CONTACTCE));
  				cce = ( CONTACTCE* )mir_realloc(cce, (cacheSize-1)*sizeof(CONTACTCE));
  				cacheSize -= 1;
  			}
 diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp index 01440e862e..d9b31ace06 100644 --- a/plugins/Variables/src/parse_alias.cpp +++ b/plugins/Variables/src/parse_alias.cpp @@ -61,7 +61,7 @@ static TCHAR *replaceArguments(TCHAR *res, TCHAR *tArg, TCHAR *rArg)  					if (res == NULL)
  						return NULL;
  				}
 -				MoveMemory(res + ecur + (_tcslen(rArg) - _tcslen(tArg)), res + ecur, (_tcslen(res + ecur) + 1)*sizeof(TCHAR));
 +				memmove(res + ecur + (_tcslen(rArg) - _tcslen(tArg)), res + ecur, (_tcslen(res + ecur) + 1)*sizeof(TCHAR));
  				_tcsncpy(res + cur, rArg, _tcslen(rArg));
  			}
  		}
 diff --git a/plugins/Variables/src/parse_inet.cpp b/plugins/Variables/src/parse_inet.cpp index 6504463eee..4843b6557f 100644 --- a/plugins/Variables/src/parse_inet.cpp +++ b/plugins/Variables/src/parse_inet.cpp @@ -39,7 +39,7 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai)  			return NULL;
  		char hex[8];
 -		MoveMemory(res + cur + 3, res + cur + 1, strlen(res + cur + 1) + 1);
 +		memmove(res + cur + 3, res + cur + 1, strlen(res + cur + 1) + 1);
  		mir_snprintf(hex, SIZEOF(hex), "%%%x", *(res + cur));
  		strncpy(res + cur, hex, strlen(hex));
  		cur += strlen(hex);
 @@ -66,7 +66,7 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai)  			memset(hex, '\0', sizeof(hex));
  			strncpy(hex, res + cur + 1, 2);
  			*(res + cur) = (char)strtol(hex, NULL, 16);
 -			MoveMemory(res + cur + 1, res + cur + 3, strlen(res + cur + 3) + 1);
 +			memmove(res + cur + 1, res + cur + 3, strlen(res + cur + 3) + 1);
  		}
  		cur++;
  	}
 diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp index 36e2fab4f6..28df138d44 100644 --- a/plugins/Variables/src/parse_str.cpp +++ b/plugins/Variables/src/parse_str.cpp @@ -86,7 +86,7 @@ static TCHAR *parseEolToCrlf(ARGUMENTSINFO *ai)  		int loc = cur - res;
  		res = (TCHAR*)mir_realloc(res, (_tcslen(res) + 2)*sizeof(TCHAR));
  		cur = res + loc;
 -		MoveMemory(cur + 2, cur + 1, (_tcslen(cur + 1) + 1)*sizeof(TCHAR));
 +		memmove(cur + 2, cur + 1, (_tcslen(cur + 1) + 1)*sizeof(TCHAR));
  		memcpy(cur, _T("\r\n"), 2 * sizeof(TCHAR));
  		cur += 2;
  	}
 @@ -147,7 +147,7 @@ static TCHAR *parseFixeol2(ARGUMENTSINFO *ai)  				res = (TCHAR*)mir_realloc(res, (_tcslen(res) + _tcslen(szReplacement) - _tcslen(szEol) + 1)*sizeof(TCHAR));
  				cur = res + pos;
  			}
 -			MoveMemory(cur + _tcslen(szReplacement), cur + _tcslen(szEol), (_tcslen(cur + _tcslen(szEol)) + 1)*sizeof(TCHAR));
 +			memmove(cur + _tcslen(szReplacement), cur + _tcslen(szEol), (_tcslen(cur + _tcslen(szEol)) + 1)*sizeof(TCHAR));
  			memcpy(cur, szReplacement, _tcslen(szReplacement)*sizeof(TCHAR));
  			pos += _tcslen(szReplacement) - 1;
  		}
 @@ -408,7 +408,7 @@ static TCHAR *parseReplace(ARGUMENTSINFO *ai)  					res = (TCHAR*)mir_realloc(res, (_tcslen(res) + _tcslen(ai->targv[i + 1]) - _tcslen(ai->targv[i]) + 1)*sizeof(TCHAR));
  					cur = res + pos;
  				}
 -				MoveMemory(cur + _tcslen(ai->targv[i + 1]), cur + _tcslen(ai->targv[i]), (_tcslen(cur + _tcslen(ai->targv[i])) + 1)*sizeof(TCHAR));
 +				memmove(cur + _tcslen(ai->targv[i + 1]), cur + _tcslen(ai->targv[i]), (_tcslen(cur + _tcslen(ai->targv[i])) + 1)*sizeof(TCHAR));
  				memcpy(cur, ai->targv[i + 1], _tcslen(ai->targv[i + 1])*sizeof(TCHAR));
  				pos += _tcslen(ai->targv[i + 1]) - 1;
  			}
 @@ -461,7 +461,7 @@ static TCHAR *parseScroll(ARGUMENTSINFO *ai)  	memset(res, 0, ((2 * _tcslen(ai->targv[1]) + 1) * sizeof(TCHAR)));
  	_tcscpy(res, ai->targv[1]);
  	_tcscat(res, ai->targv[1]);
 -	MoveMemory(res, res + move, (_tcslen(res + move) + 1)*sizeof(TCHAR));
 +	memmove(res, res + move, (_tcslen(res + move) + 1)*sizeof(TCHAR));
  	*(res + display) = 0;
  	res = (TCHAR*)mir_realloc(res, (_tcslen(res) + 1)*sizeof(TCHAR));
 diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index a378a87904..af95b31dd5 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -173,25 +173,25 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)  		pargv = argv = NULL;  		// new round  		if (*cur == DONTPARSE_CHAR) { -			MoveMemory(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR)); +			memmove(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR));  			if (*cur == DONTPARSE_CHAR)  				continue;  			while ( (*cur != DONTPARSE_CHAR) && (*cur != 0))  				cur++; -			MoveMemory(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR)); +			memmove(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR));  			pos = cur-string-1;  			continue;  		}  		// remove end of lines  		else if ((!_tcsncmp(cur, _T("\r\n"), 2)) && (gParseOpts.bStripEOL)) { -			MoveMemory(cur, cur+2, (_tcslen(cur+2)+1)*sizeof(TCHAR)); +			memmove(cur, cur+2, (_tcslen(cur+2)+1)*sizeof(TCHAR));  			pos = cur-string-1;  			continue;  		}  		else if ((*cur == '\n' && gParseOpts.bStripEOL) || (*cur == ' ' && gParseOpts.bStripWS)) { -			MoveMemory(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR)); +			memmove(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR));  			pos = cur - string - 1;  			continue;  		} @@ -206,13 +206,13 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)  				string = (TCHAR*)mir_realloc(string, (_tcslen(string)+1)*sizeof(TCHAR));  				continue;  			} -			MoveMemory(scur, cur, (_tcslen(cur)+1)*sizeof(TCHAR)); +			memmove(scur, cur, (_tcslen(cur)+1)*sizeof(TCHAR));  			pos = scur-string-1;  			continue;  		}  		else if ((*cur != FIELD_CHAR) && (*cur != FUNC_CHAR) && (*cur != FUNC_ONCE_CHAR)) {  			if (gParseOpts.bStripAll) { -				MoveMemory(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR)); +				memmove(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR));  				pos = cur - string - 1;  			}  			continue; @@ -352,7 +352,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)  		}  		scur = string+scurPos;  		cur = string+curPos; -		MoveMemory(scur + parsedTokenLen, cur, (_tcslen(cur)+1)*sizeof(TCHAR)); +		memmove(scur + parsedTokenLen, cur, (_tcslen(cur)+1)*sizeof(TCHAR));  		memcpy(scur, parsedToken, parsedTokenLen*sizeof(TCHAR));  		{  			size_t len = _tcslen(string);  | 
