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()
1438 char *mand, *p; in path_to_manpath() local
1449 if ((mand = strdup(bintoman[i].mandir)) == NULL) in path_to_manpath()
1451 if ((p = strchr(mand, ',')) != NULL) in path_to_manpath()
1453 if (stat(mand, &sb) != 0) { in path_to_manpath()
1454 free(mand); in path_to_manpath()
1459 return (mand); in path_to_manpath()
1467 if ((mand = malloc(MAXPATHLEN)) == NULL) in path_to_manpath()
1469 if (strlcpy(mand, bindir, MAXPATHLEN) >= MAXPATHLEN) { in path_to_manpath()
1470 free(mand); in path_to_manpath()
1478 for (p = mand; *p != '\0'; p++) in path_to_manpath()
1480 for (; p > mand && *p == '/'; p--) in path_to_manpath()
1482 for (; p > mand && *p != '/'; p--) in path_to_manpath()
1484 if (p == mand && *p == '.') { in path_to_manpath()
1485 if (realpath("..", mand) == NULL) { in path_to_manpath()
1486 free(mand); in path_to_manpath()
1495 if (strlcat(mand, "/share/man", MAXPATHLEN) >= MAXPATHLEN) { in path_to_manpath()
1496 free(mand); in path_to_manpath()
1500 if ((stat(mand, &sb) == 0) && S_ISDIR(sb.st_mode)) { in path_to_manpath()
1501 return (mand); in path_to_manpath()
1508 if (strlcat(mand, "/man", MAXPATHLEN) >= MAXPATHLEN) { in path_to_manpath()
1509 free(mand); in path_to_manpath()
1512 if ((stat(mand, &sb) == 0) && S_ISDIR(sb.st_mode)) { in path_to_manpath()
1513 return (mand); in path_to_manpath()
1519 free(mand); in path_to_manpath()