The R Project SVN R

Rev

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

Rev 50875 Rev 50880
Line 1632... Line 1632...
1632
	    for(s = str; ; s++) {
1632
	    for(s = str; ; s++) {
1633
		if (*s == '\n' || *s == '\0') {
1633
		if (*s == '\n' || *s == '\0') {
1634
		    double w = NA_REAL, h = NA_REAL;
1634
		    double w = NA_REAL, h = NA_REAL;
1635
		    const char *str;
1635
		    const char *str;
1636
		    *sb = '\0';
1636
		    *sb = '\0';
-
 
1637
		    /* This may R_alloc, but let's assume that
-
 
1638
		       there are not many lines of text per string */
1637
		    str = reEnc(sbuf, enc, enc2, 2);
1639
		    str = reEnc(sbuf, enc, enc2, 2);
1638
		    if (n > 1) {
1640
		    if (n > 1) {
1639
			/* first determine location of THIS line */
1641
			/* first determine location of THIS line */
1640
			if (!R_FINITE(xc))
1642
			if (!R_FINITE(xc))
1641
			    xc = 0.5;
1643
			    xc = 0.5;
Line 2385... Line 2387...
2385
	    sb = sbuf = (char*) R_alloc(strlen(str) + 1, sizeof(char));
2387
	    sb = sbuf = (char*) R_alloc(strlen(str) + 1, sizeof(char));
2386
	    for(s = str; ; s++) {
2388
	    for(s = str; ; s++) {
2387
		if (*s == '\n' || *s == '\0') {
2389
		if (*s == '\n' || *s == '\0') {
2388
		    const char *str;
2390
		    const char *str;
2389
		    *sb = '\0';
2391
		    *sb = '\0';
-
 
2392
		    /* This may R_alloc, but let's assume that
-
 
2393
		       there are not many lines of text per string */
2390
		    str = reEnc(sbuf, enc, enc2, 2);
2394
		    str = reEnc(sbuf, enc, enc2, 2);
2391
		    if(dd->dev->hasTextUTF8 == TRUE && enc2 == CE_UTF8)
2395
		    if(dd->dev->hasTextUTF8 == TRUE && enc2 == CE_UTF8)
2392
			wdash = dd->dev->strWidthUTF8(str, gc, dd->dev);
2396
			wdash = dd->dev->strWidthUTF8(str, gc, dd->dev);
2393
		    else
2397
		    else
2394
			wdash = dd->dev->strWidth(str, gc, dd->dev);
2398
			wdash = dd->dev->strWidth(str, gc, dd->dev);