Lines Matching refs:mand
424 char *mand = NULL; in build_manpath() local
433 if ((mand = path_to_manpath(*p)) == NULL) in build_manpath()
436 *p = mand; in build_manpath()
1442 char *mand, *p; in path_to_manpath() local
1453 if ((mand = strdup(bintoman[i].mandir)) == NULL) in path_to_manpath()
1455 if ((p = strchr(mand, ',')) != NULL) in path_to_manpath()
1457 if (stat(mand, &sb) != 0) { in path_to_manpath()
1458 free(mand); in path_to_manpath()
1463 return (mand); in path_to_manpath()
1471 if ((mand = malloc(MAXPATHLEN)) == NULL) in path_to_manpath()
1473 if (strlcpy(mand, bindir, MAXPATHLEN) >= MAXPATHLEN) { in path_to_manpath()
1474 free(mand); in path_to_manpath()
1482 for (p = mand; *p != '\0'; p++) in path_to_manpath()
1484 for (; p > mand && *p == '/'; p--) in path_to_manpath()
1486 for (; p > mand && *p != '/'; p--) in path_to_manpath()
1488 if (p == mand && *p == '.') { in path_to_manpath()
1489 if (realpath("..", mand) == NULL) { in path_to_manpath()
1490 free(mand); in path_to_manpath()
1499 if (strlcat(mand, "/share/man", MAXPATHLEN) >= MAXPATHLEN) { in path_to_manpath()
1500 free(mand); in path_to_manpath()
1504 if ((stat(mand, &sb) == 0) && S_ISDIR(sb.st_mode)) { in path_to_manpath()
1505 return (mand); in path_to_manpath()
1512 if (strlcat(mand, "/man", MAXPATHLEN) >= MAXPATHLEN) { in path_to_manpath()
1513 free(mand); in path_to_manpath()
1516 if ((stat(mand, &sb) == 0) && S_ISDIR(sb.st_mode)) { in path_to_manpath()
1517 return (mand); in path_to_manpath()
1523 free(mand); in path_to_manpath()