char *R_ExpandFileName(char *s) { #ifdef HAVE_LIBREADLINE if(UsingReadline) return R_ExpandFileName_readline(s, newFileName); #endif return R_ExpandFileName_unix(s, newFileName); }
const char *R_ExpandFileName(const char *s) { #ifdef HAVE_LIBREADLINE if(UsingReadline) { const char * c = R_ExpandFileName_readline(s, newFileName); /* we can return the result only if tilde_expand is not broken */ if (!c || c[0]!='~' || (c[1]!='\0' && c[1]!='/')) return c; } #endif return R_ExpandFileName_unix(s, newFileName); }