diff options
| author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-13 10:52:12 +0000 | 
|---|---|---|
| committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-13 10:52:12 +0000 | 
| commit | 5a19f89d6c8eb148e6bb7b450f702b666f685ed1 (patch) | |
| tree | 2214a02a6785d5f4716ee53d191674746b34790c /plugins/SimpleStatusMsg/src | |
| parent | 518e10779e770eac62fcedc96e750e538fa395ba (diff) | |
MoveMemory -> memmove
git-svn-id: http://svn.miranda-ng.org/main/trunk@11365 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SimpleStatusMsg/src')
| -rw-r--r-- | plugins/SimpleStatusMsg/src/main.cpp | 16 | ||||
| -rw-r--r-- | plugins/SimpleStatusMsg/src/msgbox.cpp | 2 | ||||
| -rw-r--r-- | plugins/SimpleStatusMsg/src/options.cpp | 2 | 
3 files changed, 10 insertions, 10 deletions
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 5d0bf4b922..6925b4f189 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -122,7 +122,7 @@ static TCHAR *GetWinampSong(void)  	if (pstr < szTitle + (iTitleLen / 2))
  	{
 -		MoveMemory(szTitle, pstr + 9, _tcslen(pstr + 9) * sizeof(TCHAR));
 +		memmove(szTitle, pstr + 9, _tcslen(pstr + 9) * sizeof(TCHAR));
  		pstr = _tcsstr(pstr + 1, _T(" - Winamp"));
  		if (pstr == NULL)
  		{
 @@ -163,7 +163,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status)  					if (i + 2 <= 1024 && msg[i + 2])
  					{
  						count++;
 -						MoveMemory(p, p + 1, (mir_tstrlen(p) - 1) * sizeof(TCHAR));
 +						memmove(p, p + 1, (mir_tstrlen(p) - 1) * sizeof(TCHAR));
  					}
  					else
  					{
 @@ -197,7 +197,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status)  			if (mir_tstrlen(ptszWinampTitle) > 12)
  				msg = (TCHAR *)mir_realloc(msg, (mir_tstrlen(msg) + 1 + mir_tstrlen(ptszWinampTitle) - 12) * sizeof(TCHAR));
 -			MoveMemory(msg + i + mir_tstrlen(ptszWinampTitle), msg + i + 12, (mir_tstrlen(msg) - i - 11) * sizeof(TCHAR));
 +			memmove(msg + i + mir_tstrlen(ptszWinampTitle), msg + i + 12, (mir_tstrlen(msg) - i - 11) * sizeof(TCHAR));
  			memcpy(msg + i, ptszWinampTitle, mir_tstrlen(ptszWinampTitle) * sizeof(TCHAR));
  			mir_free(ptszWinampTitle);
 @@ -232,7 +232,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status)  			if (mir_tstrlen(substituteStr) > 6)
  				msg = (TCHAR *)mir_realloc(msg, (mir_tstrlen(msg) + 1 + mir_tstrlen(substituteStr) - 6) * sizeof(TCHAR));
 -			MoveMemory(msg + i + mir_tstrlen(substituteStr), msg + i + 6, (mir_tstrlen(msg) - i - 5) * sizeof(TCHAR));
 +			memmove(msg + i + mir_tstrlen(substituteStr), msg + i + 6, (mir_tstrlen(msg) - i - 5) * sizeof(TCHAR));
  			memcpy(msg + i, substituteStr, mir_tstrlen(substituteStr) * sizeof(TCHAR));
  		}
  		else if (!_tcsnicmp(msg + i, _T("%date%"), 6))
 @@ -242,7 +242,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status)  			if (mir_tstrlen(substituteStr) > 6)
  				msg = (TCHAR *)mir_realloc(msg, (mir_tstrlen(msg) + 1 + mir_tstrlen(substituteStr) - 6) * sizeof(TCHAR));
 -			MoveMemory(msg + i + mir_tstrlen(substituteStr), msg + i + 6, (mir_tstrlen(msg) - i - 5) * sizeof(TCHAR));
 +			memmove(msg + i + mir_tstrlen(substituteStr), msg + i + 6, (mir_tstrlen(msg) - i - 5) * sizeof(TCHAR));
  			memcpy(msg + i, substituteStr, mir_tstrlen(substituteStr) * sizeof(TCHAR));
  		}
  		else if (!_tcsnicmp(msg+i, _T("%rand("), 6))
 @@ -264,7 +264,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status)  				if (mir_tstrlen(substituteStr) > k - i)
  					msg = (TCHAR *)mir_realloc(msg, (mir_tstrlen(msg) + 1 + mir_tstrlen(substituteStr) - (k - i)) * sizeof(TCHAR));
 -				MoveMemory(msg + i + mir_tstrlen(substituteStr), msg + i + (k - i), (mir_tstrlen(msg) - i - (k - i - 1)) * sizeof(TCHAR));
 +				memmove(msg + i + mir_tstrlen(substituteStr), msg + i + (k - i), (mir_tstrlen(msg) - i - (k - i - 1)) * sizeof(TCHAR));
  				memcpy(msg + i, substituteStr, mir_tstrlen(substituteStr) * sizeof(TCHAR));
  			}
  			mir_free(temp);
 @@ -314,7 +314,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status)  			if (mir_tstrlen(substituteStr) > 9)
  				msg = (TCHAR *)mir_realloc(msg, (mir_tstrlen(msg) + 1 + mir_tstrlen(substituteStr) - 9) * sizeof(TCHAR));
 -			MoveMemory(msg + i + mir_tstrlen(substituteStr), msg + i + 9, (mir_tstrlen(msg) - i - 8) * sizeof(TCHAR));
 +			memmove(msg + i + mir_tstrlen(substituteStr), msg + i + 9, (mir_tstrlen(msg) - i - 8) * sizeof(TCHAR));
  			memcpy(msg + i, substituteStr, mir_tstrlen(substituteStr) * sizeof(TCHAR));
  		}
  		else if (!_tcsnicmp(msg+i, _T("%randdefmsg%"), 12))
 @@ -362,7 +362,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status)  			if (mir_tstrlen(substituteStr) > 12)
  				msg = (TCHAR *)mir_realloc(msg, (mir_tstrlen(msg)+1+mir_tstrlen(substituteStr)-12) * sizeof(TCHAR));
 -			MoveMemory(msg + i + mir_tstrlen(substituteStr), msg + i + 12, (mir_tstrlen(msg) - i - 11) * sizeof(TCHAR));
 +			memmove(msg + i + mir_tstrlen(substituteStr), msg + i + 12, (mir_tstrlen(msg) - i - 11) * sizeof(TCHAR));
  			memcpy(msg + i, substituteStr, mir_tstrlen(substituteStr) * sizeof(TCHAR));
  		}
  	}
 diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index 7777fdfc71..aa5fcc7480 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -544,7 +544,7 @@ static LRESULT CALLBACK EditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L  			textLen = GetWindowTextLength(hwndDlg);  			text = (TCHAR *)mir_alloc(sizeof(TCHAR) * (textLen + 1));  			GetWindowText(hwndDlg, text, textLen + 1); -			MoveMemory(text + start, text + end, sizeof(TCHAR) * (textLen + 1 - end)); +			memmove(text + start, text + end, sizeof(TCHAR) * (textLen + 1 - end));  			SetWindowText(hwndDlg, text);  			mir_free(text);  			SendMessage(hwndDlg, EM_SETSEL, start, start); diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp index e6b48a54a3..5b750e136a 100644 --- a/plugins/SimpleStatusMsg/src/options.cpp +++ b/plugins/SimpleStatusMsg/src/options.cpp @@ -69,7 +69,7 @@ static LRESULT CALLBACK OptEditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam  			textLen = GetWindowTextLength(hwndDlg);
  			text = (TCHAR *)mir_alloc(sizeof(TCHAR) * (textLen + 1));
  			GetWindowText(hwndDlg, text, textLen + 1);
 -			MoveMemory(text + start, text + end, sizeof(TCHAR) * (textLen + 1 - end));
 +			memmove(text + start, text + end, sizeof(TCHAR) * (textLen + 1 - end));
  			SetWindowText(hwndDlg, text);
  			mir_free(text);
  			SendMessage(hwndDlg, EM_SETSEL, start, start);
  | 
