Lines Matching refs:manpath

54 	char		*manpath; /* desired manual directory */  member
212 req->q.manpath = NULL; in parse_query_string()
256 set_query_attr(&req->q.manpath, &val); in parse_query_string()
499 if (strcmp(req->q.manpath, req->p[i]) == 0) in resp_searchform()
527 validate_manpath(const struct req *req, const char* manpath) in validate_manpath() argument
532 if ( ! strcmp(manpath, req->p[i])) in validate_manpath()
632 if (strcmp(req->q.manpath, req->p[0])) in pg_redirect()
633 printf("%s/", req->q.manpath); in pg_redirect()
658 r[i].file, req->q.manpath); in pg_searchres()
672 if (strcmp(req->q.manpath, req->p[0])) in pg_searchres()
673 printf("%s/", req->q.manpath); in pg_searchres()
738 if (strcmp(req->q.manpath, req->p[0])) in pg_searchres()
739 printf("%s/", req->q.manpath); in pg_searchres()
918 MPARSE_VALIDATE, MANDOC_OS_OTHER, req->q.manpath); in resp_format()
926 usepath = strcmp(req->q.manpath, req->p[0]); in resp_format()
929 usepath ? req->q.manpath : "", usepath ? "/" : ""); in resp_format()
960 char *manpath; in pg_show() local
968 manpath = mandoc_strndup(fullpath, file - fullpath); in pg_show()
971 if ( ! validate_manpath(req, manpath)) { in pg_show()
974 free(manpath); in pg_show()
984 if (chdir(manpath) == -1) { in pg_show()
985 warn("chdir %s", manpath); in pg_show()
987 free(manpath); in pg_show()
990 free(manpath); in pg_show()
1023 if (chdir(req->q.manpath) == -1) { in pg_search()
1024 warn("chdir %s", req->q.manpath); in pg_search()
1150 if (req.q.manpath == NULL || req.q.sec == NULL || in main()
1158 if (req.q.manpath == NULL) in main()
1159 req.q.manpath = mandoc_strdup(req.p[0]); in main()
1160 else if ( ! validate_manpath(&req, req.q.manpath)) { in main()
1181 free(req.q.manpath); in main()
1201 req->q.manpath = NULL; in parse_path_info()
1226 req->q.manpath = mandoc_strndup(path, end - path); in parse_path_info()
1227 if (validate_manpath(req, req->q.manpath)) { in parse_path_info()
1232 free(req->q.manpath); in parse_path_info()
1233 req->q.manpath = NULL; in parse_path_info()