=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man.cgi.8,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/mandoc/man.cgi.8 2014/07/11 15:37:22 1.1 --- src/usr.bin/mandoc/man.cgi.8 2014/07/13 00:16:03 1.2 *************** *** 1,4 **** ! .\" $Id: man.cgi.8,v 1.1 2014/07/11 15:37:22 schwarze Exp $ .\" .\" Copyright (c) 2014 Ingo Schwarze .\" --- 1,4 ---- ! .\" $Id: man.cgi.8,v 1.2 2014/07/13 00:16:03 schwarze Exp $ .\" .\" Copyright (c) 2014 Ingo Schwarze .\" *************** *** 14,20 **** .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" ! .Dd $Mdocdate: July 11 2014 $ .Dt MAN.CGI 8 .Os .Sh NAME --- 14,20 ---- .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" ! .Dd $Mdocdate: July 13 2014 $ .Dt MAN.CGI 8 .Os .Sh NAME *************** *** 37,62 **** 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 .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. If one is provided, it has the same effect as the .Xr apropos 1 .Fl s option. Otherwise, pages from all sections are shown. .It ! An input box for an optional architecture name. If one is provided, it has the same effect as the .Xr apropos 1 .Fl S option. --- 37,78 ---- displays a search form containing these elements: .Bl -enum .It ! 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 ! 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 ! 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,78 **** .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 --- 83,88 ---- *************** *** 165,241 **** 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, 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 and consisting of .Ar key Ns = Ns Ar value pairs, separated by ampersands, for example ! .Pa ?manpath=OpenBSD-current&expr=mandoc . Supported keys are .Cm manpath , ! .Cm expr , .Cm sec , - and .Cm arch , corresponding to .Xr apropos 1 .Fl M , .Ar expression , .Fl s , - and .Fl S , ! respectively. For backward compatibility with the traditional .Nm , - .Cm query - is supported as an alias for - .Cm expr - and .Cm sektion ! 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 --- 175,220 ---- The path to the program, normally .Pa cgi-bin/man.cgi/ . .It ! 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 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&query=mandoc . Supported keys are .Cm manpath , ! .Cm query , .Cm sec , .Cm arch , corresponding to .Xr apropos 1 .Fl M , .Ar expression , .Fl s , .Fl S , ! 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 sektion ! 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 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 PATH_INFO The final part of the URI path passed from the client to the server, starting after the *************** *** 300,312 **** .Dq OpenBSD-current manpath. .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. .Sh SEE ALSO .Xr apropos 1 , .Xr mandoc.db 5 , --- 279,312 ---- .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 output may not be quite the same. .Sh SEE ALSO .Xr apropos 1 , .Xr mandoc.db 5 ,