Lines Matching defs:home
394 const char *home;
436 home = lookupvar("HOME");
438 * if HOME is unset, results are unspecified...
442 if (home == NULL && (pw = getpwuid(getuid())) != NULL)
443 home = pw->pw_dir;
449 home = NULL;
451 home = pw->pw_dir;
453 VTRACE(DBG_EXPAND, (" ->\"%s\"", home ? home : "<<NULL>>"));
457 * Posix XCU 2.6.1: The value of $HOME (for ~) or the initial
461 * this case, (where HOME='') a bare ~ expands to "" (which must not
464 last = '\0'; /* just in case *home == '\0' (already) */
465 if (home == NULL) {
469 while ((c = *home++) != '\0') {
477 * If HOME (or whatver) ended in a '/' (last == '/'), and
479 * of them - since we already took the one from HOME, just
484 * This is to prevent ~/foo generating //foo when HOME=/ (and