The R Project SVN R

Rev

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

Rev 32624 Rev 32639
Line 1093... Line 1093...
1093
    if (str) {
1093
    if (str) {
1094
#ifdef SUPPORT_MBCS
1094
#ifdef SUPPORT_MBCS
1095
	int n = strlen(str), used;
1095
	int n = strlen(str), used;
1096
	wchar_t wc;
1096
	wchar_t wc;
1097
	char *p = str;
1097
	char *p = str;
-
 
1098
	mbstate_t mb_st;
-
 
1099
	mbs_init(&mb_st);
1098
	while ((used = mbrtowc(&wc, p, n, NULL)) > 0) {
1100
	while ((used = mbrtowc(&wc, p, n, &mb_st)) > 0) {
1099
	    glyphBBox = GlyphBBox(wc, gc, dd);
1101
	    glyphBBox = GlyphBBox(wc, gc, dd);
1100
	    resultBBox = CombineBBoxes(resultBBox, glyphBBox);
1102
	    resultBBox = CombineBBoxes(resultBBox, glyphBBox);
1101
	    p += used; n -= used;
1103
	    p += used; n -= used;
1102
	}
1104
	}
1103
#else
1105
#else