From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s698rSxr030911 for ; Wed, 9 Jul 2014 04:53:28 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s698rSeQ018262; Wed, 9 Jul 2014 04:53:28 -0400 (EDT) Date: Wed, 9 Jul 2014 04:53:28 -0400 (EDT) Message-Id: <201407090853.s698rSeQ018262@krisdoz.my.domain> 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: include manpath= when printing queries, and omit empty X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- include manpath= when printing queries, and omit empty parameters Modified Files: -------------- mdocml: cgi.c Revision Data ------------- Index: cgi.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/cgi.c,v retrieving revision 1.52 retrieving revision 1.53 diff -Lcgi.c -Lcgi.c -u -p -r1.52 -r1.53 --- cgi.c +++ cgi.c @@ -134,12 +134,22 @@ static void http_printquery(const struct req *req) { - printf("&expr="); - http_print(req->q.expr ? req->q.expr : ""); - printf("&sec="); - http_print(req->q.sec ? req->q.sec : ""); - printf("&arch="); - http_print(req->q.arch ? req->q.arch : ""); + if (NULL != req->q.manroot) { + printf("&manpath="); + http_print(req->q.manroot); + } + if (NULL != req->q.sec) { + printf("&sec="); + http_print(req->q.sec); + } + if (NULL != req->q.arch) { + printf("&arch="); + http_print(req->q.arch); + } + if (NULL != req->q.expr) { + printf("&expr="); + http_print(req->q.expr ? req->q.expr : ""); + } } @@ -147,12 +157,22 @@ static void html_printquery(const struct req *req) { - printf("&expr="); - html_print(req->q.expr ? req->q.expr : ""); - printf("&sec="); - html_print(req->q.sec ? req->q.sec : ""); - printf("&arch="); - html_print(req->q.arch ? req->q.arch : ""); + if (NULL != req->q.manroot) { + printf("&manpath="); + html_print(req->q.manroot); + } + if (NULL != req->q.sec) { + printf("&sec="); + html_print(req->q.sec); + } + if (NULL != req->q.arch) { + printf("&arch="); + html_print(req->q.arch); + } + if (NULL != req->q.expr) { + printf("&expr="); + html_print(req->q.expr ? req->q.expr : ""); + } } static void -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv