diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-07 11:52:36 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-07 11:52:36 +0000 |
commit | a3c7e0fc904b613dc28b26f943c8b5f4ec2243a7 (patch) | |
tree | 2521481053b75e39f82b45286f821523a28f384d | |
parent | abb85b1105b82b7f491e68cbc2ce2fa327d44797 (diff) | |
download | mandoc-a3c7e0fc904b613dc28b26f943c8b5f4ec2243a7.tar.gz |
By default, man.cgi should compile with -static (this was unset by mistake).
Also, set a custom CSS for man.cgi catman files.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cgi.c | 20 |
2 files changed, 18 insertions, 4 deletions
@@ -30,7 +30,7 @@ CFLAGS += -DUSE_WCHAR #CFLAGS += -DUSE_MANPATH # If your system supports static binaries only, uncomment this. -#STATIC = -static +STATIC = -static CFLAGS += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\"" CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings @@ -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); |