The R Project SVN R

Rev

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

Rev 32397 Rev 32624
Line 30... Line 30...
30
#ifdef HAVE_CONFIG_H
30
#ifdef HAVE_CONFIG_H
31
#include <config.h>
31
#include <config.h>
32
#endif
32
#endif
33
 
33
 
34
#include <ctype.h>
34
#include <ctype.h>
35
#ifdef SUPPORT_UTF8
35
#ifdef SUPPORT_MBCS
36
# include <wchar.h>
36
# include <wchar.h>
37
# include <wctype.h>
37
# include <wctype.h>
38
#endif
38
#endif
39
 
39
 
40
 
40
 
Line 1089... Line 1089...
1089
		      R_GE_gcontext *gc, GEDevDesc *dd)
1089
		      R_GE_gcontext *gc, GEDevDesc *dd)
1090
{
1090
{
1091
    BBOX glyphBBox;
1091
    BBOX glyphBBox;
1092
    BBOX resultBBox = NullBBox();
1092
    BBOX resultBBox = NullBBox();
1093
    if (str) {
1093
    if (str) {
1094
#ifdef SUPPORT_UTF8
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
	while ((used = mbrtowc(&wc, p, n, NULL)) > 0) {
1098
	while ((used = mbrtowc(&wc, p, n, NULL)) > 0) {
1099
	    glyphBBox = GlyphBBox(wc, gc, dd);
1099
	    glyphBBox = GlyphBBox(wc, gc, dd);