Lines Matching defs:manpath
54 char *manpath; /* desired manual directory */
212 req->q.manpath = NULL;
248 else if ( ! strcmp(key, "manpath")) {
256 set_query_attr(&req->q.manpath, &val);
492 /* Write manpath selector. */
495 puts(" <select name=\"manpath\""
499 if (strcmp(req->q.manpath, req->p[i]) == 0)
527 validate_manpath(const struct req *req, const char* manpath)
532 if ( ! strcmp(manpath, req->p[i]))
632 if (strcmp(req->q.manpath, req->p[0]))
633 printf("%s/", req->q.manpath);
658 r[i].file, req->q.manpath);
672 if (strcmp(req->q.manpath, req->p[0]))
673 printf("%s/", req->q.manpath);
738 if (strcmp(req->q.manpath, req->p[0]))
739 printf("%s/", req->q.manpath);
918 MPARSE_VALIDATE, MANDOC_OS_OTHER, req->q.manpath);
926 usepath = strcmp(req->q.manpath, req->p[0]);
929 usepath ? req->q.manpath : "", usepath ? "/" : "");
960 char *manpath;
968 manpath = mandoc_strndup(fullpath, file - fullpath);
971 if ( ! validate_manpath(req, manpath)) {
973 "You specified an invalid manpath.");
974 free(manpath);
979 * Begin by chdir()ing into the manpath.
981 * relative to the manpath root.
984 if (chdir(manpath) == -1) {
985 warn("chdir %s", manpath);
987 free(manpath);
990 free(manpath);
1018 * Begin by chdir()ing into the root of the manpath.
1020 * relative to the manpath root.
1023 if (chdir(req->q.manpath) == -1) {
1024 warn("chdir %s", req->q.manpath);
1127 * subsequent scanning for manpath directories is rooted
1150 if (req.q.manpath == NULL || req.q.sec == NULL ||
1158 if (req.q.manpath == NULL)
1159 req.q.manpath = mandoc_strdup(req.p[0]);
1160 else if ( ! validate_manpath(&req, req.q.manpath)) {
1162 "You specified an invalid manpath.");
1181 free(req.q.manpath);
1201 req->q.manpath = NULL;
1224 /* Optional manpath. */
1226 req->q.manpath = mandoc_strndup(path, end - path);
1227 if (validate_manpath(req, req->q.manpath)) {
1232 free(req->q.manpath);
1233 req->q.manpath = NULL;
1273 if ((fp = fopen("manpath.conf", "r")) == NULL) {
1274 warn("%s/manpath.conf", MAN_DIR);
1288 warnx("%s/manpath.conf contains "
1294 warnx("%s/manpath.conf contains "
1306 warnx("%s/manpath.conf is empty", MAN_DIR);