Lines Matching refs:manpath
51 char *manpath; /* desired manual directory */ member
206 req->q.manpath = NULL; in parse_query_string()
250 set_query_attr(&req->q.manpath, &val); in parse_query_string()
468 if (strcmp(req->q.manpath, req->p[i]) == 0) in resp_searchform()
496 validate_manpath(const struct req *req, const char* manpath) in validate_manpath() argument
501 if ( ! strcmp(manpath, req->p[i])) in validate_manpath()
588 if (strcmp(req->q.manpath, req->p[0])) in pg_redirect()
589 printf("%s/", req->q.manpath); in pg_redirect()
613 r[i].file, req->q.manpath); in pg_searchres()
627 if (strcmp(req->q.manpath, req->p[0])) in pg_searchres()
628 printf("%s/", req->q.manpath); in pg_searchres()
689 if (strcmp(req->q.manpath, req->p[0])) in pg_searchres()
690 printf("%s/", req->q.manpath); in pg_searchres()
864 MPARSE_VALIDATE, MANDOC_OS_OTHER, req->q.manpath); in resp_format()
873 usepath = strcmp(req->q.manpath, req->p[0]); in resp_format()
876 usepath ? req->q.manpath : "", usepath ? "/" : ""); in resp_format()
907 char *manpath; in pg_show() local
915 manpath = mandoc_strndup(fullpath, file - fullpath); in pg_show()
918 if ( ! validate_manpath(req, manpath)) { in pg_show()
921 free(manpath); in pg_show()
931 if (chdir(manpath) == -1) { in pg_show()
932 warn("chdir %s", manpath); in pg_show()
934 free(manpath); in pg_show()
937 free(manpath); in pg_show()
968 if (chdir(req->q.manpath) == -1) { in pg_search()
969 warn("chdir %s", req->q.manpath); in pg_search()
1094 if (req.q.manpath == NULL || req.q.sec == NULL || in main()
1102 if (req.q.manpath == NULL) in main()
1103 req.q.manpath = mandoc_strdup(req.p[0]); in main()
1104 else if ( ! validate_manpath(&req, req.q.manpath)) { in main()
1125 free(req.q.manpath); in main()
1145 req->q.manpath = NULL; in parse_path_info()
1170 req->q.manpath = mandoc_strndup(path, end - path); in parse_path_info()
1171 if (validate_manpath(req, req->q.manpath)) { in parse_path_info()
1176 free(req->q.manpath); in parse_path_info()
1177 req->q.manpath = NULL; in parse_path_info()