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