aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgi.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-12-07 11:52:36 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-12-07 11:52:36 +0000
commita723f03473df54cccbce739fdda9b7d35da84ceb (patch)
tree2cb6edd60167ce14165d6bd8b9d80fd76512c882 /cgi.c
parent3da61d66474e06d2f2e690f79cee76dee92feeeb (diff)
downloadmandoc-a723f03473df54cccbce739fdda9b7d35da84ceb.tar.gz
mandoc-a723f03473df54cccbce739fdda9b7d35da84ceb.tar.zst
mandoc-a723f03473df54cccbce739fdda9b7d35da84ceb.zip
By default, man.cgi should compile with -static (this was unset by mistake).
Also, set a custom CSS for man.cgi catman files.
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/cgi.c b/cgi.c
index 17bc6ad7..416197be 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-/* $Id: cgi.c,v 1.10 2011/12/07 00:23:04 kristaps Exp $ */
+/* $Id: cgi.c,v 1.11 2011/12/07 11:52:36 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -423,7 +423,21 @@ resp_search(struct res *r, size_t sz, void *arg)
return;
}
- resp_begin_html(200, NULL);
+ resp_begin_http(200, NULL);
+ puts("<!DOCTYPE HTML PUBLIC " "\n"
+ " \"-//W3C//DTD HTML 4.01//EN\"" "\n"
+ " \"http://www.w3.org/TR/html4/strict.dtd\">" "\n"
+ "<HTML>" "\n"
+ " <HEAD>" "\n"
+ " <META HTTP-EQUIV=\"Content-Type\" " "\n"
+ " CONTENT=\"text/html; charset=utf-8\">" "\n"
+ " <LINK REL=\"stylesheet\" HREF=\"/catman.css\"" "\n"
+ " TYPE=\"text/css\" media=\"all\">" "\n"
+ " <TITLE>System Manpage Reference</TITLE>" "\n"
+ " </HEAD>" "\n"
+ " <BODY>" "\n"
+ "<!-- Begin page content. //-->");
+
resp_searchform((const struct req *)arg);
if (0 == sz)
@@ -614,9 +628,9 @@ format(const char *file)
return;
}
- snprintf(opts, sizeof(opts), "style=/style.css,"
+ snprintf(opts, sizeof(opts), "style=/man.css,"
"man=%s/search.html?sec=%%S&expr=%%N,"
- "includes=/cgi-bin/man.cgi/usr/include/%%I",
+ /*"includes=/cgi-bin/man.cgi/usr/include/%%I"*/,
progname);
mparse_result(mp, &mdoc, &man);