From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 457a3196 for ; Sat, 28 May 2016 08:41:19 -0500 (EST) Date: Sat, 28 May 2016 08:41:19 -0500 (EST) Message-Id: <7549292111906864476.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Simplify search form: minus two visible control elements, minus X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Simplify search form: minus two visible control elements, minus one table, minus twenty lines of code, no loss of functionality. No idea why i didn't do this earlier... Modified Files: -------------- mdocml: cgi.c man.cgi.8 Revision Data ------------- Index: cgi.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/cgi.c,v retrieving revision 1.131 retrieving revision 1.132 diff -Lcgi.c -Lcgi.c -u -p -r1.131 -r1.132 --- cgi.c +++ cgi.c @@ -385,8 +385,7 @@ resp_searchform(const struct req *req, e /* Write query input box. */ - printf( "
\n" - "q.query != NULL) html_print(req->q.query); printf( "\" size=\"40\""); @@ -394,24 +393,16 @@ resp_searchform(const struct req *req, e printf(" autofocus"); puts(">"); - /* Write submission and reset buttons. */ + /* Write submission buttons. */ - printf( "\n" - "\n"); - - /* Write show radio button */ - - printf( "\n" - "q.equal) - printf("checked=\"checked\" "); - printf( "name=\"apropos\" id=\"show\" value=\"0\">\n" - "\n"); + printf( "\n" + "\n
\n"); /* Write section selector. */ - puts( "
\n" - ""); for (i = 0; i < sec_MAX; i++) { printf("\n" - "q.equal) - printf("checked=\"checked\" "); - printf( "name=\"apropos\" id=\"search\" value=\"1\">\n" - "\n"); - - puts("
\n" - "\n" + puts("\n" "\n" ""); puts(""); Index: man.cgi.8 =================================================================== RCS file: /home/cvs/mdocml/mdocml/man.cgi.8,v retrieving revision 1.16 retrieving revision 1.17 diff -Lman.cgi.8 -Lman.cgi.8 -u -p -r1.16 -r1.17 --- man.cgi.8 +++ man.cgi.8 @@ -26,9 +26,9 @@ The CGI program searches for manual pages on a WWW server and displays them to HTTP clients, providing functionality equivalent to the -.Xr apropos 1 -and .Xr man 1 +and +.Xr apropos 1 utilities. It can use multiple manual trees in parallel. .Ss HTML search interface @@ -51,20 +51,15 @@ The effect of prepending a backslash to in the current implementation, it has no effect. .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 +submit button. +The string in the input box is interpreted as the name of a manual page. +.It +An .Xr apropos 1 -queries. +submit button. +The string in the input box is interpreted as a search +.Ar expression . .It A dropdown menu to optionally select a manual section. If one is provided, it has the same effect as the -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv