OS.memmove (ptr, buffer2, buffer2.length);
OS.memmove (ptr, buffer2, length);
int Pt_CB_MODIFY_VERIFY (int widget, int info) {	if (lastModifiedText != 0) {		OS.free (lastModifiedText);		lastModifiedText = 0;	}	if (echoCharacter == '\0' && !hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;	PtCallbackInfo_t cbinfo = new PtCallbackInfo_t ();	OS.memmove (cbinfo, info, PtCallbackInfo_t.sizeof);	PtTextCallback_t textVerify = new PtTextCallback_t ();	OS.memmove (textVerify, cbinfo.cbdata, PtTextCallback_t.sizeof);	byte [] buffer = new byte [textVerify.length];	OS.memmove (buffer, textVerify.text, buffer.length);	String text = new String (Converter.mbcsToWcs (null, buffer));	String newText = text;	if (!ignoreChange) {		Event event = new Event ();		event.start = textVerify.start_pos;		event.end = textVerify.end_pos;		event.doit = textVerify.doit != 0;		event.text = text;		if (cbinfo.event != 0) {			int data = OS.PhGetData (cbinfo.event);			if (data != 0) {				PhKeyEvent_t ke = new PhKeyEvent_t ();				OS.memmove (ke, data, PhKeyEvent_t.sizeof);				if ((ke.key_flags & (OS.Pk_KF_Key_Down | OS.Pk_KF_Key_Repeat)) != 0) {					setKeyState (event, ke);				}			}		}		sendEvent (SWT.Verify, event);		newText = event.text;		textVerify.doit = (event.doit && newText != null) ? 1 : 0;	}	if (newText != null) {		if (echoCharacter != '\0' && (textVerify.doit != 0)) {			String prefix = hiddenText.substring (0, textVerify.start_pos);			String suffix = hiddenText.substring (textVerify.end_pos, hiddenText.length ());			hiddenText = prefix + newText + suffix;			char [] charBuffer = new char [newText.length ()];			for (int i=0; i<charBuffer.length; i++) {				charBuffer [i] = echoCharacter;			}			newText = new String (charBuffer);		}		if (newText != text) {			byte [] buffer2 = Converter.wcsToMbcs (null, newText, true);			int length = buffer2.length - 1;			if (length == textVerify.length) {				OS.memmove(textVerify.text, buffer2, length);			} else {				int ptr = OS.malloc (length);				OS.memmove (ptr, buffer2, buffer2.length);				textVerify.new_insert += length - textVerify.length;				textVerify.text = ptr;				textVerify.length = length;				lastModifiedText = ptr;			}		}	}	OS.memmove (cbinfo.cbdata, textVerify, PtTextCallback_t.sizeof);	textVerify = null;	return OS.Pt_CONTINUE;}