Lines Matching defs:path

99  *                		Perform appropriate path translations for
147 char *path; /* mandir path */
203 static char localedir[MAXPATHLEN]; /* locale specific path component */
261 case 'M': /* Respecify path for man pages */
382 * If full path to command specified, customize
463 * If there are no new elements in this path,
499 * Store the mandir path into the manp structure.
510 if ((manp->path = (char *)malloc(i + 1)) == NULL)
512 (void) strlcpy(manp->path, *pv, i + 1);
528 DPRINTF("-- Adding %s\n", manp->path);
532 DPRINTF("-- Adding %s: sections=%s\n", manp->path, mansec);
538 DPRINTF("-- Adding %s: sections=%s\n", manp->path, sections);
546 DPRINTF("-- Adding %s: sections=%s (from %s)\n", manp->path,
555 DPRINTF("-- Adding %s: default search order\n", manp->path);
576 if ((dp = opendir(manp->path)) == 0)
637 ldir = addlocale(p->path);
641 mwpath(p->path);
649 getdirs(char *path, char ***dirv, int flag)
657 if ((dp = opendir(path)) == NULL)
704 ldir = addlocale(b->path);
712 (void) snprintf(whatpath, sizeof (whatpath), "%s/%s", b->path,
852 if (*(b->path) == '/') {
864 if (asprintf(&p, "%s/%s", cwd, b->path) == -1)
866 free(b->path);
867 b->path = p;
869 /* Relative manpath but no cwd: omit path entry */
889 free(manp->path);
954 /* For each path in MANPATH */
958 DPRINTF("-- Searching mandir: %s\n", p->path);
961 ldir = addlocale(p->path);
980 mandir(p->secv, p->path, name, 0);
1007 mandir(char **secv, char *path, char *name, int lspec)
1014 if ((dp = opendir(path)) == NULL)
1018 DPRINTF("-- Searching mandir: %s\n", path);
1034 (newsection = map_section(*secv, path))
1045 if (searchdir(path, *dv, name) == 0)
1120 searchdir(char *path, char *dir, char *name)
1130 (void) snprintf(sectpath, sizeof (sectpath), "%s/%s", path, dir);
1149 (void) format(path, dir, name, sd->d_name);
1166 map_section(char *section, char *path)
1177 "%s/man%s", path, map[i].new_name);
1193 format(char *path, char *dir, char *name, char *pg)
1203 (void) printf(gettext("%s(%s)\t-M %s\n"), name, dir + 3, path);
1207 (void) snprintf(manpname, sizeof (manpname), "%s/man%s/%s", path,
1209 (void) snprintf(catpname, sizeof (catpname), "%s/cat%s/%s", path,
1234 path, cattool, manpname);
1240 path, cattool, manpname);
1261 path, cattool, manpname, (manwidth > 0) ? tmpbuf : "", pager);
1273 * Add <localedir> to the path.
1276 addlocale(char *path)
1280 if (asprintf(&tmp, "%s/%s", path, localedir) == -1)
1290 check_config(char *path)
1300 (void) snprintf(fname, MAXPATHLEN, "%s/%s", path, CONFIG);
1354 /* If the path doesn't exist, treat it as a duplicate */
1355 if (stat(mnp->path, &sb) != 0)
1555 (void) printf("%s%s", colon, manp->path);
1586 "usage: man [-alptw] [-M path] [-s section] name ...\n"
1587 " man [-M path] [-s section] -k keyword ...\n"
1588 " man [-M path] [-s section] -f keyword ...\n"));
1598 "usage: %s [-M path] [-s section] keyword ...\n"),
1608 "usage: catman [-M path] [-w]\n"));