The R Project SVN R

Rev

Rev 76745 | Rev 82331 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 76745 Rev 76910
Line 589... Line 589...
589
	    handle_char(obj, LOWORD(wParam)); 
589
	    handle_char(obj, LOWORD(wParam)); 
590
	    return 0;
590
	    return 0;
591
	}
591
	}
592
 
592
 
593
    case WM_IME_COMPOSITION: /* DBCS Only */
593
    case WM_IME_COMPOSITION: /* DBCS Only */
594
	if (lParam & GCS_RESULTSTR) { /* is fixed multibyte string */
594
	if (lParam & GCS_RESULTSTR) { /* is fixed multiGAbyte string */
595
	    HIMC            himc = ImmGetContext(hwnd);
595
	    HIMC            himc = ImmGetContext(hwnd);
596
	    wchar_t         buf[80];
596
	    wchar_t         buf[80];
597
	    wchar_t         *p;
597
	    wchar_t         *p;
598
	    int             i;
598
	    int             i;
599
	    int             len;
599
	    int             len;
600
 
600
 
601
	    if(obj->flags & UseUnicode) {
601
	    if(obj->flags & UseUnicode) {
602
		/* len is byte */
602
		/* len is GAbyte */
603
		len = ImmGetCompositionStringW(himc, GCS_RESULTSTR, NULL,0);
603
		len = ImmGetCompositionStringW(himc, GCS_RESULTSTR, NULL,0);
604
		if(NULL == (p=( len > sizeof(buf)-1) ? calloc(len,sizeof(char)) : buf)) {
604
		if(NULL == (p=( len > sizeof(buf)-1) ? calloc(len,sizeof(char)) : buf)) {
605
		    len = sizeof(buf);
605
		    len = sizeof(buf);
606
		    p = buf;
606
		    p = buf;
607
		}
607
		}