The R Project SVN R

Rev

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

Rev 14622 Rev 14629
Line 759... Line 759...
759
{
759
{
760
    int nback = 0, ns;
760
    int nback = 0, ns;
761
    RCNTXT *c;
761
    RCNTXT *c;
762
    SEXP s, t;
762
    SEXP s, t;
763
 
763
 
764
    for (c = R_GlobalContext, ns = skip; c; c = c->nextcontext) {
764
    for (c = R_GlobalContext, ns = skip; c; c = c->nextcontext)
765
        if (c->callflag == CTXT_RETURN || c->callflag == CTXT_GENERIC )
765
        if (c->callflag == CTXT_RETURN || c->callflag == CTXT_GENERIC ) {
766
	    if (ns > 0)
766
	    if (ns > 0)
767
		ns--;
767
		ns--;
768
	    else
768
	    else
769
		nback++;
769
		nback++;
770
    }
770
	}
771
 
771
 
772
    PROTECT(s = allocList(nback));
772
    PROTECT(s = allocList(nback));
773
    t = s;
773
    t = s;
774
    for (c = R_GlobalContext ; c ; c = c->nextcontext)
774
    for (c = R_GlobalContext ; c ; c = c->nextcontext)
775
	if (c->callflag & CTXT_FUNCTION ) 
775
	if (c->callflag & CTXT_FUNCTION ) {
776
	    if (skip > 0)
776
	    if (skip > 0)
777
		skip--;
777
		skip--;
778
	    else {
778
	    else {
779
		SETCAR(t, deparse1(c->call, 0));
779
		SETCAR(t, deparse1(c->call, 0));
780
		t = CDR(t);
780
		t = CDR(t);
781
	    }
781
	    }
-
 
782
	}
782
    UNPROTECT(1);
783
    UNPROTECT(1);
783
    return s;
784
    return s;
784
}
785
}
785
 
786