The R Project SVN R

Rev

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

Rev 20612 Rev 21033
Line 377... Line 377...
377
	if (length(spec) == 0) {
377
	if (length(spec) == 0) {
378
	    *ptxt = R_NilValue;
378
	    *ptxt = R_NilValue;
379
	}
379
	}
380
	else {
380
	else {
381
	    nms = getAttrib(spec, R_NamesSymbol);
381
	    nms = getAttrib(spec, R_NamesSymbol);
-
 
382
	    if (nms==R_NilValue){ /* PR#1939 */
-
 
383
	       txt = VECTOR_ELT(spec, 0);
-
 
384
	       if (TYPEOF(txt) == LANGSXP ||TYPEOF(txt) == SYMSXP ) {
-
 
385
		    UNPROTECT(1);
-
 
386
		    PROTECT(txt = coerceVector(txt, EXPRSXP));
-
 
387
	       }
-
 
388
	       else if (!isExpression(txt)) {
-
 
389
		    UNPROTECT(1);
-
 
390
		    PROTECT(txt = coerceVector(txt, STRSXP));
-
 
391
	       } 
-
 
392
	    } else {
382
	    n = length(nms);
393
	       n = length(nms);
383
	    for (i = 0; i < n; i++) {
394
	       for (i = 0; i < n; i++) {
384
		if (!strcmp(CHAR(STRING_ELT(nms, i)), "cex")) {
395
		if (!strcmp(CHAR(STRING_ELT(nms, i)), "cex")) {
385
		    cex = asReal(VECTOR_ELT(spec, i));
396
		    cex = asReal(VECTOR_ELT(spec, i));
386
		}
397
		}
387
		else if (!strcmp(CHAR(STRING_ELT(nms, i)), "col")) {
398
		else if (!strcmp(CHAR(STRING_ELT(nms, i)), "col")) {
388
		    col = asInteger(FixupCol(VECTOR_ELT(spec, i), NA_INTEGER));
399
		    col = asInteger(FixupCol(VECTOR_ELT(spec, i), NA_INTEGER));
Line 403... Line 414...
403
			UNPROTECT(1);
414
			UNPROTECT(1);
404
			PROTECT(txt = coerceVector(txt, STRSXP));
415
			PROTECT(txt = coerceVector(txt, STRSXP));
405
		    }
416
		    }
406
		}
417
		}
407
		else errorcall(call, "invalid graphics parameter");
418
		else errorcall(call, "invalid graphics parameter");
-
 
419
	       }
408
	    }
420
	    }
409
	}
421
	}
410
	break;
422
	break;
411
    case STRSXP:
423
    case STRSXP:
412
    case EXPRSXP:
424
    case EXPRSXP: