/* get no-spaces version of R_HOME from the module path: used in Rgui, Rterm and Rcmd */ char *getRHOME(int m) { char *p; int hasspace = 0; getRHOMElong(m); /* make sure no spaces in path */ for (p = rhomebuf; *p; p++) if (isspace(*p)) { hasspace = 1; break; } if (hasspace) GetShortPathName(rhomebuf, rhomebuf, MAX_PATH); return (rhomebuf); }
/* get no-spaces version of R_HOME from the module path: used in Rgui, Rterm and Rcmd */ char *getRHOME(int m) { char *p; int hasspace = 0; getRHOMElong(m); /* make sure no spaces in path */ for (p = rhomebuf; *p; p++) if (isspace(*p)) { hasspace = 1; break; } if (hasspace) /* NOTE: this fails when short names are not enabled */ GetShortPathName(rhomebuf, rhomebuf, MAX_PATH); return (rhomebuf); }