The R Project SVN R

Rev

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

Rev 7886 Rev 10172
Line 28... Line 28...
28
{
28
{
29
    checkArity(op,args);
29
    checkArity(op,args);
30
#define find_char_fun \
30
#define find_char_fun \
31
    if (isValidString(CAR(args))) {				\
31
    if (isValidString(CAR(args))) {				\
32
	SEXP s;							\
32
	SEXP s;							\
33
	PROTECT(s = install(CHAR(STRING(CAR(args))[0])));	\
33
	PROTECT(s = install(CHAR(STRING_ELT(CAR(args), 0))));	\
34
	CAR(args) = findFun(s, rho);				\
34
	SETCAR(args, findFun(s, rho));				\
35
	UNPROTECT(1);						\
35
	UNPROTECT(1);						\
36
    }
36
    }
37
    find_char_fun
37
    find_char_fun
38
 
38
 
39
    if (TYPEOF(CAR(args)) != CLOSXP)
39
    if (TYPEOF(CAR(args)) != CLOSXP)
40
	errorcall(call, "argument must be a function");
40
	errorcall(call, "argument must be a function");
41
    switch(PRIMVAL(op)) {
41
    switch(PRIMVAL(op)) {
42
    case 0:
42
    case 0:
43
	DEBUG(CAR(args)) = 1;
43
	SET_DEBUG(CAR(args), 1);
44
	break;
44
	break;
45
    case 1:
45
    case 1:
46
	if( DEBUG(CAR(args)) != 1 )
46
	if( DEBUG(CAR(args)) != 1 )
47
	    warningcall(call, "argument is not being debugged");
47
	    warningcall(call, "argument is not being debugged");
48
	DEBUG(CAR(args)) = 0;
48
	SET_DEBUG(CAR(args), 0);
49
	break;
49
	break;
50
    }
50
    }
51
    return R_NilValue;
51
    return R_NilValue;
52
}
52
}
53
 
53
 
Line 62... Line 62...
62
	TYPEOF(CAR(args)) != SPECIALSXP)
62
	TYPEOF(CAR(args)) != SPECIALSXP)
63
	    errorcall(call, "argument must be a function");
63
	    errorcall(call, "argument must be a function");
64
 
64
 
65
    switch(PRIMVAL(op)) {
65
    switch(PRIMVAL(op)) {
66
    case 0:
66
    case 0:
67
	TRACE(CAR(args)) = 1;
67
	SET_TRACE(CAR(args), 1);
68
	break;
68
	break;
69
    case 1:
69
    case 1:
70
	TRACE(CAR(args)) = 0;
70
	SET_TRACE(CAR(args), 0);
71
	break;
71
	break;
72
    }
72
    }
73
    return R_NilValue;
73
    return R_NilValue;
74
}
74
}