summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-12-10 10:59:21 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-12-10 10:59:21 +0000
commitdea30820e2b066a715e7612edf9f978584103f71 (patch)
tree70ee7f09f9937c7237f6222dea4783fd328560e4
parent8c608d36c3fea82230317a1c68a6fa924aeceff1 (diff)
downloadmandoc-dea30820e2b066a715e7612edf9f978584103f71.tar.gz
FreeBSD's man.cgi uses a "default" value for no arch.
-rw-r--r--cgi.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/cgi.c b/cgi.c
index edb372e2..f17e8990 100644
--- a/cgi.c
+++ b/cgi.c
@@ -159,10 +159,17 @@ kval_query(struct query *q, const struct kval *fields, size_t sz)
q->whatis = 1;
}
- /* Section "0" means no section when in legacy mode. */
+ /*
+ * Section "0" means no section when in legacy mode.
+ * For some man.cgi scripts, "default" arch is none.
+ */
- if (q->legacy && NULL != q->sec && 0 == strcmp(q->sec, "0"))
- q->sec = NULL;
+ if (q->legacy && NULL != q->sec)
+ if (0 == strcmp(q->sec, "0"))
+ q->sec = NULL;
+ if (q->legacy && NULL != q->arch)
+ if (0 == strcmp(q->arch, "default"))
+ q->arch = NULL;
}
/*