version 1.179, 2022/07/06 16:05:40 |
version 1.181, 2023/04/28 19:11:03 |
Line 444 resp_searchform(const struct req *req, enum focus focu |
|
Line 444 resp_searchform(const struct req *req, enum focus focu |
|
|
|
/* Write query input box. */ |
/* Write query input box. */ |
|
|
printf(" <input type=\"search\" name=\"query\" value=\""); |
printf(" <label>Search query:\n" |
|
" <input type=\"search\" name=\"query\" value=\""); |
if (req->q.query != NULL) |
if (req->q.query != NULL) |
html_print(req->q.query); |
html_print(req->q.query); |
printf( "\" size=\"40\""); |
printf("\" size=\"40\""); |
if (focus == FOCUS_QUERY) |
if (focus == FOCUS_QUERY) |
printf(" autofocus"); |
printf(" autofocus"); |
puts(">"); |
puts(">\n </label>"); |
|
|
/* Write submission buttons. */ |
/* Write submission buttons. */ |
|
|
Line 491 resp_searchform(const struct req *req, enum focus focu |
|
Line 492 resp_searchform(const struct req *req, enum focus focu |
|
/* Write manpath selector. */ |
/* Write manpath selector. */ |
|
|
if (req->psz > 1) { |
if (req->psz > 1) { |
puts(" <select name=\"manpath\">"); |
puts(" <select name=\"manpath\"" |
|
" aria-label=\"Manual path\">"); |
for (i = 0; i < (int)req->psz; i++) { |
for (i = 0; i < (int)req->psz; i++) { |
printf(" <option"); |
printf(" <option"); |
if (strcmp(req->q.manpath, req->p[i]) == 0) |
if (strcmp(req->q.manpath, req->p[i]) == 0) |
|
|
#if HAVE_PLEDGE |
#if HAVE_PLEDGE |
/* |
/* |
* The "rpath" pledge could be revoked after mparse_readfd() |
* The "rpath" pledge could be revoked after mparse_readfd() |
* if the file desciptor to "/footer.html" would be opened |
* if the file descriptor to "/footer.html" would be opened |
* up front, but it's probably not worth the complication |
* up front, but it's probably not worth the complication |
* of the code it would cause: it would require scattering |
* of the code it would cause: it would require scattering |
* pledge() calls in multiple low-level resp_*() functions. |
* pledge() calls in multiple low-level resp_*() functions. |