The R Project SVN R

Rev

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

Rev 90293 Rev 90294
Line 3025... Line 3025...
3025
SEXP R_makePartialMatchWarningCondition(SEXP call, SEXP input, SEXP target)
3025
SEXP R_makePartialMatchWarningCondition(SEXP call, SEXP input, SEXP target)
3026
{
3026
{
3027
    SEXP cond =
3027
    SEXP cond =
3028
	R_makeWarningCondition(call, "partialMatchWarning", NULL, 2,
3028
	R_makeWarningCondition(call, "partialMatchWarning", NULL, 2,
3029
			       _("partial match of '%s' to '%s'"),
3029
			       _("partial match of '%s' to '%s'"),
-
 
3030
 			       TYPEOF(input) == SYMSXP ? 
3030
			       CHAR(PRINTNAME(input)),//EncodeChar??
3031
			       CHAR(PRINTNAME(input))  //EncodeChar??
-
 
3032
			       : translateChar(input),
-
 
3033
			       TYPEOF(target) == SYMSXP ?
3031
			       CHAR(PRINTNAME(target)));//EncodeChar??
3034
			       CHAR(PRINTNAME(target)) //EncodeChar??
-
 
3035
			       : translateChar(target));
3032
    PROTECT(cond);
3036
    PROTECT(cond);
3033
    R_setConditionField(cond, 2, "input", input);
3037
    R_setConditionField(cond, 2, "input", 
-
 
3038
			TYPEOF(input) == SYMSXP ? input :
-
 
3039
			ScalarString(input));
3034
    R_setConditionField(cond, 3, "target", target);
3040
    R_setConditionField(cond, 3, "target",
-
 
3041
			TYPEOF(target) == SYMSXP ? target :
-
 
3042
			ScalarString(target));
3035
    // ideally we would want the function/object in a field also
3043
    // ideally we would want the function/object in a field also
3036
    UNPROTECT(1); /* cond */
3044
    UNPROTECT(1); /* cond */
3037
    return cond;
3045
    return cond;
3038
}
3046
}
3039
 
3047