Lines Matching defs:manp
178 static void free_manp(struct man_node *manp);
499 * Store the mandir path into the manp structure.
502 getpath(struct man_node *manp, char **pv)
510 if ((manp->path = (char *)malloc(i + 1)) == NULL)
512 (void) strlcpy(manp->path, *pv, i + 1);
517 * directories) into the manp structure.
520 getsect(struct man_node *manp, char **pv)
527 manp->defsrch = 1;
528 DPRINTF("-- Adding %s\n", manp->path);
529 manp->secv = NULL;
530 get_all_sect(manp);
532 DPRINTF("-- Adding %s: sections=%s\n", manp->path, mansec);
533 manp->secv = split(mansec, ',');
534 for (sectp = manp->secv; *sectp; sectp++)
538 DPRINTF("-- Adding %s: sections=%s\n", manp->path, sections);
539 manp->secv = split(sections, ',');
540 for (sectp = manp->secv; *sectp; sectp++)
542 if (*manp->secv == NULL)
543 get_all_sect(manp);
545 manp->defsrch = 1;
546 DPRINTF("-- Adding %s: sections=%s (from %s)\n", manp->path,
548 manp->secv = split(sections, ',');
549 for (sectp = manp->secv; *sectp; sectp++)
551 if (*manp->secv == NULL)
552 get_all_sect(manp);
554 manp->defsrch = 1;
555 DPRINTF("-- Adding %s: default search order\n", manp->path);
556 manp->secv = NULL;
557 get_all_sect(manp);
565 get_all_sect(struct man_node *manp)
576 if ((dp = opendir(manp->path)) == 0)
583 if (manp->secv == NULL) {
584 if ((manp->secv = malloc(maxentries * sizeof (char *))) == NULL)
588 for (dv = dirv, p = manp->secv; *dv; dv++) {
614 if ((manp->secv = realloc(manp->secv,
617 p = manp->secv + entries;
631 do_makewhatis(struct man_node *manp)
636 for (p = manp; p != NULL; p = p->next) {
696 whatapro(struct man_node *manp, char *word)
702 for (b = manp; b != NULL; b = b->next) {
847 struct man_node *manp = *manp_head;
851 for (b = manp; b != NULL; b = b->next) {
885 free_manp(struct man_node *manp)
889 free(manp->path);
890 p = manp->secv;
895 free(manp->secv);
896 free(manp);
941 manual(struct man_node *manp, char *name)
957 for (p = manp; p != NULL; p = p->next) {
1546 * Print manp linked list to stdout.
1549 print_manpath(struct man_node *manp)
1554 for (; manp != NULL; manp = manp->next) {
1555 (void) printf("%s%s", colon, manp->path);
1565 if (manp->defsrch != 0)
1568 for (secp = manp->secv; *secp != NULL; secp++) {