The R Project SVN R

Rev

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

Rev 45446 Rev 47969
Line 24... Line 24...
24
 
24
 
25
#include "Defn.h"
25
#include "Defn.h"
26
 
26
 
27
SEXP attribute_hidden do_debug(SEXP call, SEXP op, SEXP args, SEXP rho)
27
SEXP attribute_hidden do_debug(SEXP call, SEXP op, SEXP args, SEXP rho)
28
{
28
{
-
 
29
    SEXP ans = R_NilValue;
-
 
30
 
29
    checkArity(op,args);
31
    checkArity(op,args);
30
#define find_char_fun \
32
#define find_char_fun \
31
    if (isValidString(CAR(args))) {				\
33
    if (isValidString(CAR(args))) {				\
32
	SEXP s;							\
34
	SEXP s;							\
33
	PROTECT(s = install(translateChar(STRING_ELT(CAR(args), 0))));	\
35
	PROTECT(s = install(translateChar(STRING_ELT(CAR(args), 0))));	\
Line 45... Line 47...
45
    case 1:
47
    case 1:
46
	if( DEBUG(CAR(args)) != 1 )
48
	if( DEBUG(CAR(args)) != 1 )
47
	    warningcall(call, "argument is not being debugged");
49
	    warningcall(call, "argument is not being debugged");
48
	SET_DEBUG(CAR(args), 0);
50
	SET_DEBUG(CAR(args), 0);
49
	break;
51
	break;
-
 
52
    case 2:
-
 
53
        ans = ScalarLogical(DEBUG(CAR(args)));
-
 
54
        break;
50
    }
55
    }
51
    return R_NilValue;
56
    return ans;
52
}
57
}
53
 
58
 
54
SEXP attribute_hidden do_trace(SEXP call, SEXP op, SEXP args, SEXP rho)
59
SEXP attribute_hidden do_trace(SEXP call, SEXP op, SEXP args, SEXP rho)
55
{
60
{
56
    checkArity(op, args);
61
    checkArity(op, args);