* mdocml: include manpath= when printing queries, and omit empty
@ 2014-07-09 8:53 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-07-09 8:53 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-09 8:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-09 8:53 mdocml: include manpath= when printing queries, and omit empty schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).