aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit50e1b4e65a3b84c5b08776a80649262a16238e3b (patch)
treea13dce8119e455f6a4b5b6c84a2b75d2f62d7578 /cgi.c
parent3d438a3600536da5375d7629896667530c476aaf (diff)
downloadmandoc-50e1b4e65a3b84c5b08776a80649262a16238e3b.tar.gz
mandoc-50e1b4e65a3b84c5b08776a80649262a16238e3b.tar.zst
mandoc-50e1b4e65a3b84c5b08776a80649262a16238e3b.zip
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.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/cgi.c b/cgi.c
index 5a21856a..0ab736b8 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-/* $Id: cgi.c,v 1.142 2017/01/19 13:35:02 schwarze Exp $ */
+/* $Id: cgi.c,v 1.143 2017/01/19 13:55:56 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@usta.de>
@@ -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"