summaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-19 13:55:56 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-19 13:55:56 +0000
commitf2de92e7f42f6d51626705767846ad79183d961c (patch)
treec16b4c9b4906f9549aec61bed11c05f2790029cb /cgi.c
parent7e120ae54929e67f6c54d41ad0789f48600cfb3a (diff)
downloadmandoc-f2de92e7f42f6d51626705767846ad79183d961c.tar.gz
Adjust indentation of the HTML output to the conventions established
by html.c. No semantic change.
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/cgi.c b/cgi.c
index 5f8683b8..715e7597 100644
--- a/cgi.c
+++ b/cgi.c
@@ -351,10 +351,10 @@ resp_begin_html(int code, const char *msg)
printf("<!DOCTYPE html>\n"
"<html>\n"
"<head>\n"
- "<meta charset=\"UTF-8\"/>\n"
- "<link rel=\"stylesheet\" href=\"%s/mandoc.css\""
+ " <meta charset=\"UTF-8\"/>\n"
+ " <link rel=\"stylesheet\" href=\"%s/mandoc.css\""
" type=\"text/css\" media=\"all\">\n"
- "<title>%s</title>\n"
+ " <title>%s</title>\n"
"</head>\n"
"<body>\n",
CSS_DIR, CUSTOMIZE_TITLE);
@@ -378,13 +378,13 @@ resp_searchform(const struct req *req, enum focus focus)
int i;
printf("<form action=\"/%s\" method=\"get\">\n"
- "<fieldset>\n"
- "<legend>Manual Page Search Parameters</legend>\n",
+ " <fieldset>\n"
+ " <legend>Manual Page Search Parameters</legend>\n",
scriptname);
/* Write query input box. */
- printf("<input type=\"text\" name=\"query\" value=\"");
+ printf(" <input type=\"text\" name=\"query\" value=\"");
if (req->q.query != NULL)
html_print(req->q.query);
printf( "\" size=\"40\"");
@@ -394,45 +394,46 @@ resp_searchform(const struct req *req, enum focus focus)
/* Write submission buttons. */
- printf( "<button type=\"submit\" name=\"apropos\" value=\"0\">"
+ printf( " <button type=\"submit\" name=\"apropos\" value=\"0\">"
"man</button>\n"
- "<button type=\"submit\" name=\"apropos\" value=\"1\">"
- "apropos</button>\n<br/>\n");
+ " <button type=\"submit\" name=\"apropos\" value=\"1\">"
+ "apropos</button>\n"
+ " <br/>\n");
/* Write section selector. */
- puts("<select name=\"sec\">");
+ puts(" <select name=\"sec\">");
for (i = 0; i < sec_MAX; i++) {
- printf("<option value=\"%s\"", sec_numbers[i]);
+ printf(" <option value=\"%s\"", sec_numbers[i]);
if (NULL != req->q.sec &&
0 == strcmp(sec_numbers[i], req->q.sec))
printf(" selected=\"selected\"");
printf(">%s</option>\n", sec_names[i]);
}
- puts("</select>");
+ puts(" </select>");
/* Write architecture selector. */
- printf( "<select name=\"arch\">\n"
- "<option value=\"default\"");
+ printf( " <select name=\"arch\">\n"
+ " <option value=\"default\"");
if (NULL == req->q.arch)
printf(" selected=\"selected\"");
puts(">All Architectures</option>");
for (i = 0; i < arch_MAX; i++) {
- printf("<option value=\"%s\"", arch_names[i]);
+ printf(" <option value=\"%s\"", arch_names[i]);
if (NULL != req->q.arch &&
0 == strcmp(arch_names[i], req->q.arch))
printf(" selected=\"selected\"");
printf(">%s</option>\n", arch_names[i]);
}
- puts("</select>");
+ puts(" </select>");
/* Write manpath selector. */
if (req->psz > 1) {
- puts("<select name=\"manpath\">");
+ puts(" <select name=\"manpath\">");
for (i = 0; i < (int)req->psz; i++) {
- printf("<option ");
+ printf(" <option ");
if (strcmp(req->q.manpath, req->p[i]) == 0)
printf("selected=\"selected\" ");
printf("value=\"");
@@ -441,10 +442,10 @@ resp_searchform(const struct req *req, enum focus focus)
html_print(req->p[i]);
puts("</option>");
}
- puts("</select>");
+ puts(" </select>");
}
- puts("</fieldset>\n"
+ puts(" </fieldset>\n"
"</form>");
}
@@ -579,19 +580,18 @@ pg_searchres(const struct req *req, struct manpage *r, size_t sz)
puts("<table>");
for (i = 0; i < sz; i++) {
- printf("<tr>\n"
- "<td class=\"title\">\n"
+ printf(" <tr>\n"
+ " <td class=\"title\">"
"<a href=\"/%s%s%s/%s",
scriptname, *scriptname == '\0' ? "" : "/",
req->q.manpath, r[i].file);
printf("\">");
html_print(r[i].names);
- printf("</a>\n"
- "</td>\n"
- "<td class=\"desc\">");
+ printf("</a></td>\n"
+ " <td class=\"desc\">");
html_print(r[i].output);
puts("</td>\n"
- "</tr>");
+ " </tr>");
}
puts("</table>\n"