The R Project SVN R

Rev

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

Rev 40218 Rev 40705
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Langage for Statistical Data Analysis
2
 *  R : A Computer Langage for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1998-2006   The R Development Core Team.
4
 *  Copyright (C) 1998-2007   The R Development Core Team.
5
 *
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
9
 *  (at your option) any later version.
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_ELT(CAR(args), 0))));	\
33
	PROTECT(s = install(translateChar(STRING_ELT(CAR(args), 0))));	\
34
	SETCAR(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
 
Line 170... Line 170...
170
    for (cptr = R_GlobalContext; cptr; cptr = cptr->nextcontext) {
170
    for (cptr = R_GlobalContext; cptr; cptr = cptr->nextcontext) {
171
	if ((cptr->callflag & (CTXT_FUNCTION | CTXT_BUILTIN))
171
	if ((cptr->callflag & (CTXT_FUNCTION | CTXT_BUILTIN))
172
	    && TYPEOF(cptr->call) == LANGSXP) {
172
	    && TYPEOF(cptr->call) == LANGSXP) {
173
	    SEXP fun = CAR(cptr->call);
173
	    SEXP fun = CAR(cptr->call);
174
	    Rprintf("%s ",
174
	    Rprintf("%s ",
175
		    TYPEOF(fun) == SYMSXP ? CHAR(PRINTNAME(fun)) :
175
		    TYPEOF(fun) == SYMSXP ? translateChar(PRINTNAME(fun)) :
176
		    "<Anonymous>");
176
		    "<Anonymous>");
177
	}
177
	}
178
    }
178
    }
179
    Rprintf("\n");
179
    Rprintf("\n");
180
}
180
}
Line 217... Line 217...
217
 
217
 
218
    if (origin != R_NilValue){
218
    if (origin != R_NilValue){
219
	SET_TRACE(object, 1);
219
	SET_TRACE(object, 1);
220
	if (R_current_trace_state()) {
220
	if (R_current_trace_state()) {
221
	    Rprintf("tracemem[%s -> %p]: ", 
221
	    Rprintf("tracemem[%s -> %p]: ", 
222
		    CHAR(STRING_ELT(origin, 0)), (void *) object);
222
		    translateChar(STRING_ELT(origin, 0)), (void *) object);
223
	    memtrace_stack_dump();
223
	    memtrace_stack_dump();
224
	}
224
	}
225
    }
225
    }
226
    return ans;
226
    return ans;
227
#else
227
#else