The R Project SVN R

Rev

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

Rev 68947 Rev 70830
Line 306... Line 306...
306
{
306
{
307
 
307
 
308
    checkArity(op, args);
308
    checkArity(op, args);
309
    SEXP x = CAR(args);
309
    SEXP x = CAR(args);
310
    if (!isString(x) || LENGTH(x) != 1)
310
    if (!isString(x) || LENGTH(x) != 1)
311
	errorcall(call, _("argument '%s' must be a character string"), "x");
311
	error(_("argument '%s' must be a character string"), "x");
312
    const char *fn = R_ExpandFileName(translateChar(STRING_ELT(x, 0)));
312
    const char *fn = R_ExpandFileName(translateChar(STRING_ELT(x, 0)));
313
    int res = process_Renviron(fn);
313
    int res = process_Renviron(fn);
314
    if (!res)
314
    if (!res)
315
	warningcall(call, _("file '%s' cannot be opened for reading"), fn);
315
	warning(_("file '%s' cannot be opened for reading"), fn);
316
    return ScalarLogical(res != 0);
316
    return ScalarLogical(res != 0);
317
}
317
}