summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-13 00:19:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-13 00:19:51 +0000
commit2906400105b323eed34fff88bc761602177d6a6d (patch)
treecc9aa968a77acb5045f882a33590dd6f1bd2faee
parent487baa0149fdbc350b5af992e399db2a1940f96d (diff)
downloadmandoc-2906400105b323eed34fff88bc761602177d6a6d.tar.gz
update after recent code changes
-rw-r--r--man.cgi.8112
1 files changed, 56 insertions, 56 deletions
diff --git a/man.cgi.8 b/man.cgi.8
index 519777e0..e9f23bce 100644
--- a/man.cgi.8
+++ b/man.cgi.8
@@ -37,26 +37,42 @@ At the top of each generated HTML page,
displays a search form containing these elements:
.Bl -enum
.It
-A
-.Dq Search
-button to send a search request from the client to the server,
-to be clicked after filling in the following input box(es).
-.It
-An input box for search queries, expecting an
+An input box for search queries, expecting
+either a name of a manual page or an
.Ar expression
using the syntax described in the
.Xr apropos 1
manual; filling this in is required for each search.
.It
-An input box for an optional section number.
+A
+.Dq Submit
+button to send a search request from the client to the server.
+.It
+A
+.Dq Reset
+button to undo any changes to the input boxes and the dropdown menus
+and reset them to the values contained in the
+.Ev QUERY_STRING .
+.It
+Radio buttons to select pages either by name like in
+.Xr man 1
+or using
+.Xr apropos 1
+queries.
+.It
+A dropdown menu to optionally select a manual section.
If one is provided, it has the same effect as the
+.Xr man 1
+and
.Xr apropos 1
.Fl s
option.
Otherwise, pages from all sections are shown.
.It
-An input box for an optional architecture name.
+A dropdown menu to optionally select an architecture.
If one is provided, it has the same effect as the
+.Xr man 1
+and
.Xr apropos 1
.Fl S
option.
@@ -67,12 +83,6 @@ If the configuration file
.Pa /var/www/man/manpath.conf
contains only one manpath, the dropdown menu is not shown.
By default, the first manpath given in the file is used.
-.It
-A
-.Dq Reset
-button to undo any changes to the input boxes and the dropdown menu
-and reset them to the values contained in the
-.Ev QUERY_STRING .
.El
.Ss Program output
The
@@ -165,77 +175,46 @@ The host name and a following slash.
The path to the program, normally
.Pa cgi-bin/man.cgi/ .
.It
-A page name, which can be
-.Cm index ,
-which is the default and can be omitted,
-.Cm search ,
-or
-.Cm show .
-.It
-For
-.Cm show
-only, a slash, the manpath, another slash,
+To show a single page, a slash, the manpath, another slash,
and the name of the requested file, for example
.Pa /OpenBSD-current/man1/mandoc.1 .
.It
-For
-.Cm search
-only, a query string starting with a question mark
+For searches, a query string starting with a question mark
and consisting of
.Ar key Ns = Ns Ar value
pairs, separated by ampersands, for example
-.Pa ?manpath=OpenBSD-current&expr=mandoc .
+.Pa ?manpath=OpenBSD-current&query=mandoc .
Supported keys are
.Cm manpath ,
-.Cm expr ,
+.Cm query ,
.Cm sec ,
-and
.Cm arch ,
corresponding to
.Xr apropos 1
.Fl M ,
.Ar expression ,
.Fl s ,
-and
.Fl S ,
-respectively.
+respectively, and
+.Cm apropos ,
+which is a boolean parameter to select or deselect the
+.Xr apropos 1
+query mode.
For backward compatibility with the traditional
.Nm ,
-.Cm query
-is supported as an alias for
-.Cm expr
-and
.Cm sektion
-as an alias for
+is supported as an alias for
.Cm sec .
.El
.Sh ENVIRONMENT
The web server may pass the following CGI variables to
.Nm :
.Bl -tag -width Ds
-.It Ev CSS_DIR
-An optional path to the directory containing the CSS files,
-to be specified relative to the server's document root,
-and to be specified without a trailing slash.
-When not specified, the CSS files
-are assumed to be in the document root.
-This is used in generated HTML code.
.It Ev HTTP_HOST
The FQDN of the (possibly virtual) host the HTTP server is running on.
This is used for
.Ic Location:
headers in HTTP 303 responses.
-.It Ev MAN_DIR
-A path to the
-.Nm
-data directory to be used instead of
-.Pa /man ,
-relative to the web server
-.Xr chroot 2
-directory, to be specified without a trailing slash.
-This is prepended to the manpath when opening
-.Xr mandoc.db 5
-and manual page files.
.It Ev PATH_INFO
The final part of the URI path passed from the client to the server,
starting after the
@@ -300,13 +279,34 @@ source file located below the
.Dq OpenBSD-current
manpath.
.El
+.Sh COMPILE-TIME DEFINES
+.Bl -tag -width Ds
+.It Ev CSS_DIR
+An optional path to the directory containing the CSS files,
+to be specified relative to the server's document root,
+and to be specified without a trailing slash.
+When not specified, the CSS files
+are assumed to be in the document root.
+This is used in generated HTML code.
+.It Ev MAN_DIR
+A path to the
+.Nm
+data directory to be used instead of
+.Pa /var/www/man ,
+relative to the web server
+.Xr chroot 2
+directory, to be specified without a trailing slash.
+This is prepended to the manpath when opening
+.Xr mandoc.db 5
+and manual page files.
+.El
.Sh COMPATIBILITY
The
.Nm
CGI program is call-compatible with queries from the traditional
.Pa man.cgi
script by Wolfram Schneider.
-However, the results may not be quite the same.
+However, the output may not be quite the same.
.Sh SEE ALSO
.Xr apropos 1 ,
.Xr mandoc.db 5 ,