The R Project SVN R

Rev

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

Rev 14631 Rev 14723
Line 434... Line 434...
434
    R_ClearerrConsole();
434
    R_ClearerrConsole();
435
    R_ParseError = 0;
435
    R_ParseError = 0;
436
 
436
 
437
    /* find the jump target; do the jump if target is a CTXT_RESTART */
437
    /* find the jump target; do the jump if target is a CTXT_RESTART */
438
    for (c = R_GlobalContext; c; c = c->nextcontext) {
438
    for (c = R_GlobalContext; c; c = c->nextcontext) {
439
	if (c->callflag == CTXT_RETURN || c->callflag == CTXT_GENERIC )
439
	if (c->callflag & CTXT_FUNCTION )
440
	    nback++;
440
	    nback++;
441
	if (IS_RESTART_BIT_SET(c->callflag)) {
441
	if (IS_RESTART_BIT_SET(c->callflag)) {
442
	    inError=0;
442
	    inError=0;
443
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
443
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
444
	}
444
	}
Line 455... Line 455...
455
	R_CleanUp(SA_NOSAVE, 1, 0); /* quit, no save, no .Last, status=1 */
455
	R_CleanUp(SA_NOSAVE, 1, 0); /* quit, no save, no .Last, status=1 */
456
    }
456
    }
457
 
457
 
458
    PROTECT(s = allocList(nback));
458
    PROTECT(s = allocList(nback));
459
    t = s;
459
    t = s;
460
    for (c = R_GlobalContext ; c ; c = c->nextcontext)
460
    for (c = R_GlobalContext ;
-
 
461
	 c != NULL && c->callflag != CTXT_TOPLEVEL;
-
 
462
	 c = c->nextcontext)
461
	if (c->callflag & CTXT_FUNCTION ) {
463
	if (c->callflag & CTXT_FUNCTION ) {
462
	    SETCAR(t, deparse1(c->call, 0));
464
	    SETCAR(t, deparse1(c->call, 0));
463
	    t = CDR(t);
465
	    t = CDR(t);
464
	}
466
	}
465
    setVar(install(".Traceback"), s, R_GlobalEnv);
467
    setVar(install(".Traceback"), s, R_GlobalEnv);
Line 759... Line 761...
759
{
761
{
760
    int nback = 0, ns;
762
    int nback = 0, ns;
761
    RCNTXT *c;
763
    RCNTXT *c;
762
    SEXP s, t;
764
    SEXP s, t;
763
 
765
 
764
    for (c = R_GlobalContext, ns = skip; c; c = c->nextcontext)
766
    for (c = R_GlobalContext, ns = skip;
-
 
767
	 c != NULL && c->callflag != CTXT_TOPLEVEL;
-
 
768
	 c = c->nextcontext)
765
        if (c->callflag == CTXT_RETURN || c->callflag == CTXT_GENERIC ) {
769
	if (c->callflag & CTXT_FUNCTION ) {
766
	    if (ns > 0)
770
	    if (ns > 0)
767
		ns--;
771
		ns--;
768
	    else
772
	    else
769
		nback++;
773
		nback++;
770
	}
774
	}
771
 
775
 
772
    PROTECT(s = allocList(nback));
776
    PROTECT(s = allocList(nback));
773
    t = s;
777
    t = s;
774
    for (c = R_GlobalContext ; c ; c = c->nextcontext)
778
    for (c = R_GlobalContext ;
-
 
779
	 c != NULL && c->callflag != CTXT_TOPLEVEL;
-
 
780
	 c = c->nextcontext)
775
	if (c->callflag & CTXT_FUNCTION ) {
781
	if (c->callflag & CTXT_FUNCTION ) {
776
	    if (skip > 0)
782
	    if (skip > 0)
777
		skip--;
783
		skip--;
778
	    else {
784
	    else {
779
		SETCAR(t, deparse1(c->call, 0));
785
		SETCAR(t, deparse1(c->call, 0));